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 |
|---|---|---|---|---|---|---|
Execute previously defined operation | R execute(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void runOperation();",
"public void execute() {\n\t\t// XOR GATE OP\n\t\txor.a.set(a.get());\n\t\txor.b.set(b.get());\n\t\txor.execute();\n\t\tsum.set(xor.out.get());\n\n\t\t// AND GATE OP\n\t\tand.a.set(a.get());\n\t\tand.b.set(b.get());\n\t\tand.execute();\n\t\tcarry.set(and.out.get());\n\n\t}"... | [
"0.68750507",
"0.68270075",
"0.68240154",
"0.6808039",
"0.67969644",
"0.67899114",
"0.6731859",
"0.6727455",
"0.67239225",
"0.67239225",
"0.67239225",
"0.67239225",
"0.67070144",
"0.6659355",
"0.66537905",
"0.6619929",
"0.6617132",
"0.6616704",
"0.65985936",
"0.65978646",
"0.... | 0.0 | -1 |
write your code here | public static int findPivot(int[] arr) {
int low=0;
int high=arr.length-1;
while(low<high)
{
int mid= (low+high)/2;
if(arr[mid]<arr[high])
{
high=mid;
}
else
{
low=mid+1;
}
}
return arr[low];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logic(){\r\n\r\n\t}",
"public static void generateCode()\n {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpub... | [
"0.61019534",
"0.6054925",
"0.58806974",
"0.58270746",
"0.5796887",
"0.56999695",
"0.5690986",
"0.56556827",
"0.5648637",
"0.5640487",
"0.56354505",
"0.56032085",
"0.56016207",
"0.56006724",
"0.5589654",
"0.5583692",
"0.55785793",
"0.55733466",
"0.5560209",
"0.55325305",
"0.5... | 0.0 | -1 |
Implementations of this interface encapsulate ID generation logic. Currently there is only one implementation IDGeneratorImpl but only this public interface is exposed to callers to allow for the possibility of different implementations later. IDGeneratorFactory returns implementations of this interface. | public interface IDGenerator {
/**
* Return the name of the ID sequence which this instance encapsulates.
*
* @return the name of the ID sequence which this instance encapsulates
*/
public String getIDName();
/**
* Returns the next ID in the ID sequence encapsulated by this instance. Internal state is updated so that this ID
* is not returned again from this method.
*
* @return the next ID in the ID sequence
*
* @throws IDGenerationException if an error occurs while generating the ID (for example, error while connecting to
* the database)
*/
public long getNextID() throws IDGenerationException;
/**
* <p>
* Returns the next ID in the ID sequence encapsulated by this instance in the form of a BigInteger, rather than a
* long.
* </p>
*
* @return next ID in the ID sequence as a BigInteger
*
* @throws IDGenerationException if an error occurs while generating the ID (for example, error while connecting to
* the database)
*/
public BigInteger getNextBigID() throws IDGenerationException;
/**
* <p>
* Disposes the id generator instance.
* </p>
*/
public void dispose();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IdentifiersFactory getIdentifiersFactory();",
"public interface IdFactory extends Supplier<String>\n{\n\n // Twitter has encountered a similar need for generating coherent IDs and has developed Snowflake:\n // https://blog.twitter.com/2010/announcing-snowflake\n\n /**\n * @return A new unique identifier... | [
"0.6775316",
"0.6350866",
"0.6226617",
"0.61404395",
"0.5886585",
"0.5845377",
"0.58398587",
"0.5720617",
"0.5663601",
"0.56370044",
"0.5635801",
"0.563096",
"0.5623927",
"0.56103855",
"0.5579951",
"0.55628717",
"0.55587214",
"0.5530142",
"0.55198014",
"0.54923195",
"0.547322... | 0.7410777 | 0 |
Return the name of the ID sequence which this instance encapsulates. | public String getIDName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getName() {\n return seqName;\n }",
"public String getSequenceName() {\n return sequenceName;\n }",
"public String getSequenceName() {\n return sequenceName;\n }",
"@Nonnull\n\tpublic String getSequenceName() {\n\t\treturn _sequenceName;\n\t}",
"public String ge... | [
"0.8158687",
"0.7979033",
"0.7977068",
"0.76378745",
"0.74690026",
"0.73714954",
"0.721523",
"0.7180672",
"0.7180672",
"0.7180347",
"0.7175389",
"0.7151689",
"0.70582384",
"0.6975409",
"0.69195306",
"0.6911875",
"0.68984425",
"0.68897104",
"0.6886979",
"0.6880188",
"0.6865416... | 0.7076861 | 12 |
Returns the next ID in the ID sequence encapsulated by this instance. Internal state is updated so that this ID is not returned again from this method. | public long getNextID() throws IDGenerationException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getNextId() {\n while (!isIdFree(this.nextId)) {\n this.nextId += 1;\n }\n return Integer.toString(this.nextId);\n }",
"public String getNextId() {\n while (!this.isIdFree(this.nextId)) {\n this.nextId += 1;\n }\n return Integer.toString(this.nextId);\... | [
"0.8152266",
"0.8146005",
"0.7939028",
"0.79328275",
"0.7870494",
"0.78472525",
"0.75438344",
"0.7531786",
"0.75306875",
"0.7530656",
"0.7495941",
"0.7445345",
"0.7363539",
"0.72938126",
"0.7170931",
"0.710382",
"0.7070883",
"0.70296484",
"0.7021841",
"0.7004913",
"0.6993426"... | 0.78496766 | 5 |
Returns the next ID in the ID sequence encapsulated by this instance in the form of a BigInteger, rather than a long. | public BigInteger getNextBigID() throws IDGenerationException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BigInteger getNextBigID() {\n return new BigInteger(Long.toString(++id));\n }",
"public long getNextID() throws IDGenerationException;",
"private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}",
"pub... | [
"0.8317458",
"0.7500292",
"0.7408243",
"0.7350621",
"0.7342013",
"0.7273971",
"0.72609156",
"0.72112185",
"0.69777334",
"0.6940431",
"0.6936728",
"0.6912553",
"0.67179614",
"0.6713973",
"0.6658066",
"0.66402656",
"0.6633646",
"0.66225535",
"0.6585763",
"0.65802795",
"0.657941... | 0.8140761 | 1 |
Disposes the id generator instance. | public void dispose(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void dispose()\n {\n while( m_count > 0 )\n {\n int i = m_count - 1;\n try\n {\n m_factory.decommission( m_pool[ i ] );\n }\n catch( Exception e )\n {\n // To be backwards compatible, we have to ... | [
"0.61260295",
"0.6069601",
"0.6066507",
"0.5966223",
"0.59383434",
"0.5900272",
"0.5834787",
"0.58199024",
"0.57269907",
"0.5717487",
"0.5715535",
"0.56759953",
"0.56758606",
"0.56559366",
"0.56539124",
"0.56457907",
"0.5628145",
"0.5625029",
"0.5623218",
"0.56053054",
"0.559... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
OSFactory osFactory = new OSFactory();
OS os = osFactory.getOs("windows");
os.spec();
} | {
"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 |
/ xaxis shift from baseline in ECEF coordinates | public double getDx() {
return dx;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int getOrigX() {\n return 1;\n }",
"public static int getEndXCoordinate(){\n\t\tint x = getThymioEndField_X(); \n\t\t\n\t\tif(x == 0){\n\t\t\n \t}else{\n \t x *= FIELD_HEIGHT;\n \t}\n\n\t\treturn x;\n\t}",
"public static double getOrigX() {\n return 2.926776647567749;\n ... | [
"0.5904099",
"0.5818337",
"0.57922447",
"0.5703187",
"0.55943227",
"0.559307",
"0.5587958",
"0.55664444",
"0.5558474",
"0.5540353",
"0.5516291",
"0.5505756",
"0.54641676",
"0.54529464",
"0.54511356",
"0.54359186",
"0.54359186",
"0.54359186",
"0.5429746",
"0.5427804",
"0.54061... | 0.0 | -1 |
/ yaxis shift from baseline in ECEF coordinates | public double getDy() {
return dy;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getEndY();",
"public static int getOrigY() {\n return 5;\n }",
"public static int getEndYCoordinate(){\n\tint y = getThymioEndField_Y(); \n\t\t\n\t\tif(y == 0){\n\t\t\n \t}else{\n \t y *= FIELD_HEIGHT;\n \t}\n\t\treturn y;\n\t}",
"private double translateY( double yRaw )\r\n {\r\... | [
"0.59922975",
"0.5914799",
"0.58928365",
"0.5875497",
"0.58220875",
"0.580286",
"0.580286",
"0.580286",
"0.580286",
"0.580286",
"0.5732003",
"0.56830263",
"0.5664166",
"0.5658916",
"0.56570345",
"0.56456536",
"0.5635734",
"0.5617336",
"0.5570738",
"0.5564006",
"0.55553067",
... | 0.0 | -1 |
/ zaxis shift from baseline in ECEF coordinates | public double getDz() {
return dz;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getZ()\n {\n return zaxis;\n }",
"Point3D getLeftUpperBackCorner();",
"float getZ();",
"float getZ();",
"float getZ();",
"float getAccZ();",
"@Override\n\tpublic double getZLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn z-side;\n\t}",
"abstract double getOrgZ();",
... | [
"0.5728583",
"0.5632156",
"0.5512654",
"0.5512654",
"0.5512654",
"0.55046904",
"0.54406023",
"0.5390361",
"0.53743446",
"0.53375643",
"0.53244907",
"0.5283068",
"0.5272939",
"0.5253562",
"0.52443594",
"0.52297163",
"0.5189376",
"0.5185229",
"0.5176877",
"0.5176852",
"0.516913... | 0.0 | -1 |
returns the reference ellipsoid used in this datum | public Ellipsoid getEllipsoid() {
return ellipse;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static double[][] getEllipsoid(final ImageStack aInputStack, final int[] aLables, final double[] aResol)\r\n\t{\r\n\t\tfinal double[][] ellipsoids = GeometricMeasures3D.inertiaEllipsoid(aInputStack, aLables, aResol);\r\n\t\treturn ellipsoids;\r\n\t}",
"public PVector getElbowPosition(){\n\t\treturn this.... | [
"0.6094621",
"0.605091",
"0.599804",
"0.5953888",
"0.5892808",
"0.5830679",
"0.5810722",
"0.5735691",
"0.56854045",
"0.56854045",
"0.563752",
"0.5604943",
"0.555228",
"0.5532828",
"0.5518396",
"0.55153716",
"0.55116075",
"0.55071074",
"0.5500209",
"0.54977876",
"0.5491302",
... | 0.73165035 | 0 |
Creates new form addcar | public addcar() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PostMapping(\"/add-car\")\n public String addCar(@ModelAttribute Car car){\n cars.add(car);\n\n return \"redirect:/car\";\n }",
"public void add (Car car){\n\t\t}",
"@SneakyThrows\n private void addCar(ActionEvent event) {\n final Project project = table.getSelectionModel().getSe... | [
"0.7301225",
"0.6880759",
"0.644182",
"0.64038277",
"0.63466823",
"0.62662655",
"0.62225",
"0.62093633",
"0.6152168",
"0.613224",
"0.61236054",
"0.6101139",
"0.6100741",
"0.60610735",
"0.6034132",
"0.59933084",
"0.59871954",
"0.59742856",
"0.59704936",
"0.5960502",
"0.5949884... | 0.6882342 | 1 |
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() {
cardetail = new javax.swing.JPanel();
carvalidity = new javax.swing.JTextField();
caraverage = new javax.swing.JTextField();
carcolor = new javax.swing.JTextField();
carmodel = new javax.swing.JTextField();
carno = new javax.swing.JTextField();
submit1 = new javax.swing.JButton();
cancel1 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton9 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jSeparator2 = new javax.swing.JSeparator();
jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true);
setResizable(false);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
cardetail.setBackground(new java.awt.Color(204, 0, 51));
cardetail.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
cardetail.setOpaque(false);
cardetail.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
carvalidity.setBorder(null);
carvalidity.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
carvalidityActionPerformed(evt);
}
});
cardetail.add(carvalidity, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 140, 290, 20));
caraverage.setBorder(null);
caraverage.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
caraverageActionPerformed(evt);
}
});
cardetail.add(caraverage, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 190, 320, 20));
carcolor.setBorder(null);
carcolor.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
carcolorActionPerformed(evt);
}
});
cardetail.add(carcolor, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 260, 330, 20));
carmodel.setBorder(null);
cardetail.add(carmodel, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 70, 310, 20));
carno.setBorder(null);
carno.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
carnoActionPerformed(evt);
}
});
cardetail.add(carno, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 10, 290, 20));
submit1.setBackground(new java.awt.Color(0, 51, 204));
submit1.setForeground(new java.awt.Color(255, 255, 255));
submit1.setText("submit");
submit1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
submit1ActionPerformed(evt);
}
});
cardetail.add(submit1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 330, 120, 30));
cancel1.setBackground(new java.awt.Color(0, 51, 204));
cancel1.setForeground(new java.awt.Color(255, 255, 255));
cancel1.setText("cancel");
cardetail.add(cancel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 330, 110, 30));
getContentPane().add(cardetail, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 230, 450, 400));
jButton3.setBackground(new java.awt.Color(0, 102, 204));
jButton3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jButton3.setForeground(new java.awt.Color(255, 255, 255));
jButton3.setText("add driver");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 310, 170, 40));
jButton9.setBackground(new java.awt.Color(0, 102, 204));
jButton9.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jButton9.setForeground(new java.awt.Color(255, 255, 255));
jButton9.setText("View");
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
});
getContentPane().add(jButton9, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 380, 170, 40));
jButton7.setBackground(new java.awt.Color(0, 102, 204));
jButton7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jButton7.setForeground(new java.awt.Color(255, 255, 255));
jButton7.setText("vehicle booking");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
getContentPane().add(jButton7, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 180, 170, 40));
jButton2.setBackground(new java.awt.Color(255, 255, 255));
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/adminlogin/car/closedicon.png"))); // NOI18N
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1337, 0, 20, 30));
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/adminlogin/car/toplogo.png"))); // NOI18N
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 10, 190, 20));
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel3.setForeground(new java.awt.Color(255, 255, 255));
jLabel3.setText("Add Vehicle");
jLabel3.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel3MouseClicked(evt);
}
});
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 255, 80, 30));
getContentPane().add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 30, 1360, 80));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/adminlogin/car/addcar.png"))); // NOI18N
jLabel1.setText("jLabel1");
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(-20, -10, 1500, 760));
pack();
setLocationRelativeTo(null);
} | {
"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.73191524",
"0.7290383",
"0.7290383",
"0.7290383",
"0.7286656",
"0.72480965",
"0.72141695",
"0.72080517",
"0.7195647",
"0.7190378",
"0.71841127",
"0.71591616",
"0.71478844",
"0.7093131",
"0.70816",
"0.70577854",
"0.6987355",
"0.69769996",
"0.69551086",
"0.69545007",
"0.6945... | 0.0 | -1 |
string larger as 128 bytes | @Export
static DOMString constant() {
String constant = "1234567890 äöüäöüß " // umlaute
+ "𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡 𝒥𝒶𝓋𝒶𝓈𝒸𝓇𝒾𝓅𝓉 " // surrogate chars
+ "abcdefghijklmnopqrstuvwxyz";
return JSObject.domString( constant );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void stringFromLong() {\n assertEquals(\n \"784dd132\",\n JdkHashTools.getStringFromLong(2018365746)\n );\n }",
"private String UTF8Encode(String s) {\n\n\n s = s.replace(\"\\r\\n\", \"\\n\");\n int[] utftext = new int[s.length() * 3]... | [
"0.6107291",
"0.59532183",
"0.59370047",
"0.5936078",
"0.5931886",
"0.59169626",
"0.58762074",
"0.5866007",
"0.5865944",
"0.58340454",
"0.58328784",
"0.57936245",
"0.57735145",
"0.57623184",
"0.5761876",
"0.5747761",
"0.57395697",
"0.5729376",
"0.5716196",
"0.57088405",
"0.57... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
int[] sortArray = new int[] {1,-5,10,2,8};
BubbleSort.sort(sortArray);
for(int elm:sortArray){
System.out.println("Sorted Array "+elm);
}
} | {
"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 |
instantiate a new Stack object that accepts Integer objects it is implemented as a tree | public static void main(String[] args) {
Set<Integer> S1 = new TreeSet<>();
// add objects
S1.add(65); S1.add(36); S1.add(24); S1.add(36);
// show the content and assert they are sorted and no duplications
System.out.println("set = " + S1);
//remove elements
S1.remove(36); S1.remove(24);
System.out.println(S1); //assert set = 65
S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80
System.out.println("set = " +S1); //assert set = 15, 24, 65, 80
System.out.println("Does S1 contain 10?"
+ S1.contains(10)); // assert false
System.out.println("S1 has " + S1.size() +" objects"); // assert 4
// create another Set object implemented using HashSet
Set<Integer> S2 = new HashSet<>();
// add all objects in S1 to S2
S2.addAll(S1);
System.out.println("hashset = " +S2); //assert they may not be ordered
// create another Set object implemented using LinkedHashSet
Set<Integer> S3 = new LinkedHashSet<>();
S3.add(150); // add 150
S3.addAll(S1);// add all objects in S1 to S2
System.out.println("LinkedHashSet = " +S3);//assert s3=[150,15,24,65,80]
S3.removeAll(S3); // remove all items
System.out.println("LinkedHashSet = " +S3);//assert s3=[]
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Stack(E it){\r\n top = new Node<E>(it);\r\n size++;\r\n }",
"Stack<Integer> createStack() {\n\t\tStack<Integer> my_stack = new Stack<Integer>();\n\t\t\n\t\t// Add all numbers in linkedlist to stack one by one\n\t\tNode curr = head;\n\t\twhile (curr != null) {\n\t\t\tmy_stack.push(curr.dat... | [
"0.6597595",
"0.6534246",
"0.65002656",
"0.6464087",
"0.6449188",
"0.6429733",
"0.63763994",
"0.6330664",
"0.63180256",
"0.6292815",
"0.6126168",
"0.6117532",
"0.61044985",
"0.6096228",
"0.60774344",
"0.6053653",
"0.6052019",
"0.60384715",
"0.60141426",
"0.60116696",
"0.60113... | 0.0 | -1 |
/ This creates and returns a MessageSource bean. Messages are obtained from files that begin with 'message' and end with '.properties' extension. | @Bean
public MessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("messages");
return messageSource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\n\tpublic ResourceBundleMessageSource messageSource() {\n\t\tResourceBundleMessageSource source = new ResourceBundleMessageSource();\n\t\t/*\n\t\t * By default, Spring will try to find messages_XX.properties under\n\t\t * src/main/resources. To change such location we need to call\n\t\t * setBasenames. This ... | [
"0.71838087",
"0.70549375",
"0.704999",
"0.7020618",
"0.7014864",
"0.6992476",
"0.6985717",
"0.6976751",
"0.6861756",
"0.66673183",
"0.662671",
"0.65919834",
"0.65264416",
"0.64859813",
"0.64281106",
"0.6279141",
"0.62410855",
"0.6169693",
"0.6137315",
"0.5799856",
"0.5781234... | 0.70910215 | 1 |
Returns repos for selected product | public JsonArray getRepos(int productId) {
String url = "/product/repos";
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("productId", productId);
JsonObject sendObject = sqlHandler.createPostDataObject("_post_product_repos", jsonObject);
JsonElement returnElement = this.sqlHandler.post(url, sendObject);
JsonArray repoJsonArray = new JsonArray();
ProcessorCommon.checkValidResponseAndPopulateArray(returnElement, "repositories", "repository", repoJsonArray);
return repoJsonArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRepos() {\n return repos;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"public List<Repo> getRepos() {\n return repos;\n }",
"Product getPProducts();",
"@Override\r\n public List<Product> find... | [
"0.6487966",
"0.63378847",
"0.6248792",
"0.6169179",
"0.61270463",
"0.6063441",
"0.6063441",
"0.6040242",
"0.60393786",
"0.59911096",
"0.5953213",
"0.5910675",
"0.59096587",
"0.58471435",
"0.5828989",
"0.5787146",
"0.5787146",
"0.57854694",
"0.5747462",
"0.574283",
"0.574283"... | 0.6951398 | 0 |
The system checks for the branches of current repo in db. The branches in db are tagged with a version There can be new branches crated at git remote. So theses branches also needed to be display for tagging with a version. | public JsonArray getBranchesForRepo(String repoUrl, int repoId) {
// get version labeled branches from db
String url = "/repo/branches";
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("repoId", repoId);
JsonObject sendObject = sqlHandler.createPostDataObject("_post_repo_branches", jsonObject);
JsonElement returnElement = this.sqlHandler.post(url, sendObject);
JsonArray branchJsonArray = new JsonArray();
ProcessorCommon.checkValidResponseAndPopulateArray(returnElement, "branches", "branch", branchJsonArray);
// get branch names from db
ArrayList<String> dbBranchNameArray = new ArrayList<>();
for (JsonElement branch : branchJsonArray) {
JsonObject branchObject = branch.getAsJsonObject();
dbBranchNameArray.add(ProcessorCommon.trimJsonElementString(branchObject.get("branchName")));
}
String gitRepoName = ProcessorCommon.extractRepoName(repoUrl);
// logger.debug("Extracting branch data for " + repoName + "from git");
// get branches from git
url = gitBaseUrl + "/repos/" + gitRepoName + "/branches";
JsonArray gitBranchArray = this.gitHandlerImplement.getJSONArrayFromGit(url);
for (JsonElement branch : gitBranchArray) {
JsonObject branchObject = branch.getAsJsonObject();
String name = ProcessorCommon.trimJsonElementString(branchObject.get("name"));
if (!dbBranchNameArray.contains(name)) {
JsonObject tempBranchObject = new JsonObject();
tempBranchObject.addProperty("branchId", -1);
tempBranchObject.addProperty("branchName", name);
tempBranchObject.addProperty("versionId", -1);
tempBranchObject.addProperty("versionName", "null");
branchJsonArray.add(tempBranchObject);
}
}
return branchJsonArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateBranches() throws VcsException {\n VirtualFile root = getSelectedRoot();\n GitLineHandler handler = new GitLineHandler(myProject, root, GitCommand.BRANCH);\n handler.addParameters(\"--no-color\", \"-a\", \"--no-merged\");\n String output = ProgressManager.getInstance().runProcessWithP... | [
"0.67688036",
"0.65945625",
"0.62794167",
"0.6142752",
"0.60436934",
"0.6023157",
"0.5948093",
"0.5927156",
"0.59037024",
"0.58928055",
"0.5850064",
"0.5815101",
"0.57257944",
"0.565827",
"0.56560165",
"0.55871063",
"0.5582478",
"0.5580245",
"0.55550086",
"0.55457187",
"0.553... | 0.6963858 | 0 |
private static ByteArrayOutputStream stream = new ByteArrayOutputStream(); private static byte[] bytearray = null; | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_up);
b = (Button) findViewById(R.id.btnSelectPhoto);
viewImage=(ImageView)findViewById(R.id.viewImage);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
selectImage();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ByteArrayOutputStream getOutputStream() {\n \t\treturn bos;\n \t}",
"public ByteArray()\n\t{\n\t\t// initialize the byte array\n\t\tbytes = new byte[0];\n\t}",
"private static byte[] construct(Serializable object) {\n\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\ttry {\n\t // ... | [
"0.6729957",
"0.64206535",
"0.641594",
"0.62818325",
"0.62065977",
"0.6190645",
"0.6151107",
"0.6151107",
"0.6112043",
"0.6051871",
"0.60419536",
"0.60419536",
"0.599287",
"0.5918884",
"0.58653885",
"0.5844219",
"0.5806801",
"0.57783127",
"0.57741404",
"0.5724987",
"0.5703556... | 0.0 | -1 |
On click method to sign up a new user. | public void signUp(View view) {
final EditText nameField = (EditText) findViewById(R.id.name);
final EditText emailField = (EditText) findViewById(R.id.email);
final EditText phoneField = (EditText) findViewById(R.id.phoneNumber);
final EditText passwordField = (EditText) findViewById(R.id.signUpPassword);
final String name = nameField.getText().toString();
final String email = emailField.getText().toString();
final String phone = phoneField.getText().toString();
final String password = passwordField.getText().toString();
// Check to make sure a username and password were entered
if (name.length() == 0 || password.length() == 0 || email.length () == 0 || phone.length() == 0) {
Toast.makeText(getApplicationContext(), "Invalid field",
Toast.LENGTH_SHORT).show();
return;
}
// Create a new Parse User object
ParseUser user = new ParseUser();
//ParseFile file = new ParseFile("picture.png", bytearray);
//file.saveInBackground();
// Set the user's username and password
user.setEmail(email);
user.put("phone", phone);
user.put("name", name);
//user.put("File", file);
user.setPassword(password);
user.setUsername(email);
user.signUpInBackground(new SignUpCallback() {
public void done(ParseException e) {
if (e == null) {
Toast.makeText(getApplicationContext(), "Sign Up Success",
Toast.LENGTH_LONG).show();
returnToLoginActivity();
} else {
Log.e("Sign up failed", e.getMessage());
Toast.makeText(getApplicationContext(), "Sign Up Failed",
Toast.LENGTH_LONG).show();
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals(\"\") || pw.equals(\"\") || na.equals(\"\")|| em.equals(\"\")){\n\t\t\ttext = \"Please ... | [
"0.8151816",
"0.7808759",
"0.78066814",
"0.78028387",
"0.7680221",
"0.7635541",
"0.7581355",
"0.75270456",
"0.75216776",
"0.7488923",
"0.7466231",
"0.7453826",
"0.73737526",
"0.7363608",
"0.7355306",
"0.7331342",
"0.73210824",
"0.72853976",
"0.72710395",
"0.7259428",
"0.72480... | 0.0 | -1 |
Returns user to login activity, after successful account creation. | private void returnToLoginActivity() {
Intent returnToLogin = new Intent(this, Login.class);
startActivity(returnToLogin);
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void makeLogin() {\n if (enableLoginActivity && mAuth.getCurrentUser() == null) {\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n else if (!enableLoginActivity) {\n user = new User(\"johnDoe\", \"johnDoe@gmail.com\... | [
"0.6761969",
"0.6503509",
"0.64532566",
"0.6428722",
"0.62312245",
"0.61719346",
"0.61026996",
"0.6072328",
"0.6072328",
"0.6036641",
"0.6032041",
"0.60146457",
"0.6014141",
"0.6008432",
"0.6003292",
"0.600304",
"0.59998673",
"0.59936494",
"0.5967043",
"0.59657115",
"0.595534... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void run() {
try {
if (urlString != null && !urlString.equals("")) {
if (urlString.endsWith(".gif")) {
handler.sendEmptyMessage(SHOW_VIEW_GIF);
} else if (!urlString.endsWith(".gif")) {
bitmapDrawable = null;
bitmapDrawable = ((BitmapDrawable) loadImageFromUrl(urlString)).getBitmap();
if (bitmapDrawable != null) {
handler.sendEmptyMessage(SHOW_VIEW);
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
} | {
"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 |
ArrayList getFeatures(HttpServletRequest request) throws Exception; | void onBoardUser(@Valid String x,HttpServletRequest request)throws Exception; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<String> getFeatures();",
"List<Feature> getFeatures();",
"java.util.List<java.lang.String> getFeaturesList();",
"java.util.List<iet.distributed.telemetry.Feature> \n getFeatureList();",
"ArrayList<Feature> getFeatures(String userid, String project)throws Exception;",
"public Feature[] getFeatur... | [
"0.7584549",
"0.7525346",
"0.74840844",
"0.71189374",
"0.70476836",
"0.69564456",
"0.692846",
"0.67185706",
"0.66000587",
"0.66000587",
"0.64842135",
"0.64537257",
"0.6447512",
"0.6444507",
"0.64201224",
"0.63653004",
"0.63475317",
"0.6343947",
"0.6295609",
"0.62579376",
"0.6... | 0.0 | -1 |
ArrayList getFeaturesAlready(HttpServletRequest request) throws Exception; | ArrayList<Feature> getFeatures(String userid, String project)throws Exception; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Feature> getFeatures();",
"List<String> getFeatures();",
"@View( value = VIEW_MANAGE_FEATURES, defaultView = true )\r\n public String getManageFeatures( HttpServletRequest request )\r\n {\r\n _feature = null;\r\n\r\n List<Feature> listFeatures = (List<Feature>) FeatureHome.getFeaturesL... | [
"0.6631393",
"0.66217744",
"0.6605692",
"0.65928185",
"0.64740366",
"0.625949",
"0.606101",
"0.601122",
"0.5934134",
"0.59117454",
"0.5874332",
"0.5871093",
"0.5866543",
"0.58460736",
"0.58460736",
"0.58357775",
"0.5830628",
"0.57228225",
"0.56951493",
"0.56844056",
"0.568349... | 0.66263425 | 1 |
Creates new form Form1 | public Form1() {
initComponents();
setGlassPane(glassPaneLoading1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"FORM createFORM();",
"public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }",
"public form2() {\n initComponents();\n }",
"public FormInserir() {\n initComponents();\n }",
"public static FormV1 createEntity() {\n FormV1 formV1 =... | [
"0.7497697",
"0.6760649",
"0.67348695",
"0.6480332",
"0.6423301",
"0.6410303",
"0.6323666",
"0.627617",
"0.6255213",
"0.61857176",
"0.6161167",
"0.60896474",
"0.60787076",
"0.6003586",
"0.5970611",
"0.5950867",
"0.59502035",
"0.5940603",
"0.59059954",
"0.5896222",
"0.58680826... | 0.0 | -1 |
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() {
glassPaneLoading1 = new GlassPaneLoading();
jScrollPane1 = new JScrollPane();
jTextArea1 = new JTextArea();
jTextField1 = new JTextField();
jProgressBar1 = new JProgressBar();
jButton1 = new JButton();
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
jTextArea1.setColumns(20);
jTextArea1.setRows(5);
jScrollPane1.setViewportView(jTextArea1);
jTextField1.setText("jTextField1");
jTextField1.setToolTipText("hello");
jButton1.setText("loadinnnnnggggg");
jButton1.addActionListener(this);
GroupLayout layout = new GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(jTextField1, GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE))
.addGroup(Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jButton1)
.addPreferredGap(ComponentPlacement.RELATED, 119, Short.MAX_VALUE)
.addComponent(jProgressBar1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(jTextField1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED, 159, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(Alignment.TRAILING)
.addComponent(jProgressBar1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(jButton1))
.addContainerGap())
);
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.73191476",
"0.72906625",
"0.72906625",
"0.72906625",
"0.72860986",
"0.7248112",
"0.7213479",
"0.72078276",
"0.7195841",
"0.71899796",
"0.71840525",
"0.7158498",
"0.71477973",
"0.7092748",
"0.70800966",
"0.70558053",
"0.69871384",
"0.69773406",
"0.69548076",
"0.69533914",
"... | 0.0 | -1 |
Code for dispatching events from components to event handlers. | public void actionPerformed(java.awt.event.ActionEvent evt) {
if (evt.getSource() == jButton1) {
Form1.this.jButton1ActionPerformed(evt);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void dispatchEvent(AWTEvent event) {\n Object src = event.getSource();\n if (event instanceof ActiveEvent) {\n // This could become the sole method of dispatching in time.\n ((ActiveEvent)event).dispatch();\n } else if (src instanceof Component) {\n (... | [
"0.7232316",
"0.6648353",
"0.65143394",
"0.6423496",
"0.63149244",
"0.62598306",
"0.6259458",
"0.61654615",
"0.6117709",
"0.61034346",
"0.6042049",
"0.60409015",
"0.60014075",
"0.595985",
"0.59576494",
"0.59295213",
"0.5929276",
"0.5915184",
"0.58881354",
"0.58723027",
"0.585... | 0.0 | -1 |
Default constructor b/c I don't like not having one | public SquareController(){
this.model = new Square();
this.view = new SquareView(model);
view.addMouseListener(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"defaultConstructor(){}",
"void DefaultConstructor(){}",
"private Default()\n {}",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"Reproducible newInstance();",
"O() { super(null); }",
"private Instantiation(){}",
"public Constructor(){\n\t\t... | [
"0.8104933",
"0.7965392",
"0.7649015",
"0.75250655",
"0.7244414",
"0.720443",
"0.7135243",
"0.7100987",
"0.70718485",
"0.70400685",
"0.7019327",
"0.70069367",
"0.6993165",
"0.6978564",
"0.6963739",
"0.6937067",
"0.69357556",
"0.6915556",
"0.69133866",
"0.6887326",
"0.6826424"... | 0.0 | -1 |
Constructor with private information | public SquareController(Square model, SquareView view){
this.model = model;
this.view = view;
view.addMouseListener(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Instantiation(){}",
"private SystemInfo() {\r\n // forbid object construction \r\n }",
"public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }",
"private Rekenhulp()\n\t{\n\t}",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \... | [
"0.748621",
"0.72859913",
"0.7277732",
"0.7220499",
"0.713686",
"0.7107715",
"0.7066902",
"0.69884455",
"0.6982554",
"0.6971688",
"0.6947478",
"0.69400966",
"0.6939534",
"0.6920156",
"0.69154406",
"0.69089353",
"0.68801516",
"0.6859033",
"0.6841076",
"0.68365216",
"0.68168193... | 0.0 | -1 |
interface implementations for the MouseListener for the moment I only need Clicked | public void mousePressed(MouseEvent e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void mouseClicked(MouseEvent e);",
"public abstract void mouseClicked(MouseClickedEvent event);",
"public void mouseClicked(int mouseX, int mouseY, int mouse) {}",
"void onMouseClicked(MouseEventContext mouseEvent);",
"@Override\n public void mouseClicked(MouseEvent arg0) {\n \n ... | [
"0.7766482",
"0.76590025",
"0.75980455",
"0.75492567",
"0.75464237",
"0.75406814",
"0.75406814",
"0.75406814",
"0.75406814",
"0.7479041",
"0.74464643",
"0.74397594",
"0.74364007",
"0.74364007",
"0.7429658",
"0.74289006",
"0.7424183",
"0.742285",
"0.742285",
"0.742285",
"0.741... | 0.0 | -1 |
troubleshooting see if handler is reading System.out.println("Mouse is clicked"); | public void mouseClicked(MouseEvent e) {
Color current = model.getColor();
//this will be better as a separate function but later
if (current==Color.red){ //if red
model.setColor(Color.blue);
}
else if (current==Color.blue){
model.setColor(Color.green);
}
else if (current==Color.green) {
model.setColor(Color.white);
}
else{ //anything but red or blue or green
model.setColor(Color.red);
}
view.resetView(model);
view.updateSquare();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tSystem.out.println(\"Mouse event\");\r\n\r\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tSystem.out.println(\"mouseClicked\");\n\n\t}",
"@Override\r\n public void mouseClicked(MouseEvent event) {\r\n ... | [
"0.7272135",
"0.7225621",
"0.7202567",
"0.71074647",
"0.7070364",
"0.704932",
"0.694206",
"0.6924227",
"0.68132925",
"0.678075",
"0.6729315",
"0.6729315",
"0.6713742",
"0.665059",
"0.6643722",
"0.6641968",
"0.6633714",
"0.66312104",
"0.66312104",
"0.66312104",
"0.66312104",
... | 0.0 | -1 |
next step to add: KeyBinder to respond to left and right arrows to change the size of the square getters and setters call the model (Square) methods then call the method to update the view to make sure that they match | public void setSquareSide (int newLength){
model.setSideLength(newLength);
view.resetView(model);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SquareController(){\r\n \t\r\n this.model = new Square();\r\n this.view = new SquareView(model);\r\n view.addMouseListener(this);\r\n}",
"public void drawSquareView() {\r\n \tview.updateSquare();\r\n \tview.drawSquare();\r\n }",
"@Override\n\tprotected void onSizeChanged... | [
"0.6261966",
"0.6201452",
"0.61423963",
"0.57785743",
"0.57328475",
"0.568411",
"0.56549853",
"0.5645848",
"0.56403524",
"0.5640056",
"0.5639358",
"0.55787563",
"0.55617815",
"0.55594814",
"0.5548367",
"0.5520051",
"0.5493329",
"0.54826176",
"0.5453619",
"0.54377973",
"0.5434... | 0.60038346 | 3 |
updateSquareView calls the method to show the information in view | public void drawSquareView() {
view.updateSquare();
view.drawSquare();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showSquareDetails(){\r\n view.printSquareDetails(model.getSideLength(), model.getColor());\r\n }",
"void updateView();",
"void updateView();",
"void updateView () {\n updateScore();\n board.clearTemp();\n drawGhostToBoard();\n drawCurrentToTemp();\n vi... | [
"0.74584377",
"0.7324476",
"0.7324476",
"0.6990997",
"0.6752708",
"0.6545685",
"0.65178365",
"0.6407095",
"0.62436396",
"0.62396526",
"0.6229525",
"0.61943066",
"0.617826",
"0.61352575",
"0.61292905",
"0.6110137",
"0.61054033",
"0.6084925",
"0.6038651",
"0.60150194",
"0.59911... | 0.8111586 | 0 |
this is for troubleshooting purposes, prints out the information about the square to console | public void showSquareDetails(){
view.printSquareDetails(model.getSideLength(), model.getColor());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showHeuristics() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n System.out.printf(\"%3d\", getSquareAccessibility(row, col));\n if (col == BOARD_SIZE - 1) {\n System.out.println();\n ... | [
"0.7285206",
"0.72023576",
"0.692146",
"0.68624836",
"0.68411833",
"0.6497431",
"0.6477956",
"0.6402062",
"0.63819593",
"0.6371783",
"0.6356345",
"0.6345222",
"0.63165927",
"0.6315719",
"0.6286148",
"0.6279882",
"0.62792385",
"0.62723124",
"0.6270109",
"0.62491876",
"0.624468... | 0.711904 | 2 |
Enable the plugin only in case no other plugin will manager the Annotation aspect. | private boolean accept(CompileContext context, Module module) {
for (Facet f : FacetManager.getInstance(module).getAllFacets()) {
if (f.getTypeId().toString().equals("osgiBundleFacet")) {
// The Felix Maven plugin will case about annotations.
context.addMessage(CompilerMessageCategory.INFORMATION,
"Felix SCR Annotation Processor disabled for Module: '" +
module.getName() +
"' because Apache Felix Maven plugin has been detected", null, 0, 0);
return false;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void enable(CommonPlugin plugin);",
"protected abstract void onPluginEnable();",
"public void onEnable() {\n\r\n \tloadSettings();\r\n \tinitDbPool();\r\n \t\r\n // EXAMPLE: Custom code, here we just output some info so we can check all is well\r\n PluginDescriptionFile pdfFile = ... | [
"0.6900564",
"0.6690511",
"0.63163406",
"0.62874144",
"0.6177822",
"0.6114767",
"0.58804077",
"0.5853195",
"0.58392674",
"0.5722847",
"0.5705976",
"0.5660046",
"0.5658375",
"0.5646355",
"0.560191",
"0.5589593",
"0.5589593",
"0.55849063",
"0.557233",
"0.5568461",
"0.55646175",... | 0.5553755 | 57 |
Returns the value of the 'Ifc Colour Specification' containment reference. If the meaning of the 'Ifc Colour Specification' containment reference isn't clear, there really should be more of a description here... | IfcColourSpecification getIfcColourSpecification(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IfcPreDefinedColour getIfcPreDefinedColour();",
"public String getColour()\n\t{\n\t\treturn colour;\n\t}",
"public Colour getColour() {\n\t\treturn colour;\n\t}",
"public String getColour() {\r\n return colour;\r\n }",
"public String getColour() {\n return colour;\n }",
"public String getCo... | [
"0.6613932",
"0.64975303",
"0.6473244",
"0.6456321",
"0.6402077",
"0.6402077",
"0.6212406",
"0.6176397",
"0.61431986",
"0.61386913",
"0.6033664",
"0.59261525",
"0.59242207",
"0.5816731",
"0.5584877",
"0.55777353",
"0.5507904",
"0.5455085",
"0.5421552",
"0.54171",
"0.5408662",... | 0.8343871 | 0 |
Returns the value of the 'Ifc Pre Defined Colour' containment reference. If the meaning of the 'Ifc Pre Defined Colour' containment reference isn't clear, there really should be more of a description here... | IfcPreDefinedColour getIfcPreDefinedColour(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IfcColourSpecification getIfcColourSpecification();",
"public String getColour() {\r\n return colour;\r\n }",
"public String getColour()\n\t{\n\t\treturn colour;\n\t}",
"public String getColour() {\n return colour;\n }",
"public String getColour() {\n return colour;\n }",
"public ... | [
"0.74826777",
"0.69381857",
"0.6927952",
"0.68787163",
"0.68787163",
"0.6824771",
"0.66716015",
"0.6614786",
"0.64997786",
"0.6481061",
"0.6383529",
"0.63802505",
"0.6235944",
"0.618142",
"0.61217225",
"0.6059018",
"0.6019908",
"0.6018512",
"0.59397537",
"0.59287685",
"0.5899... | 0.84987676 | 0 |
REPOSITORIES THAT NEED APACHE LICENSE | private Repository getAccountsRepository()
{
RepositoryBuilder repoBuilder = new RepositoryBuilder("optionalModules", "accounts", LicenseType.APACHE_LICENSE, BranchType.TRUNK);
return repoBuilder.buildRepository();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"License createLicense();",
"public String getLicense();",
"@Override\n\tpublic final void checkLicense() {\n\t}",
"java.lang.String[] getLicenseWindows() throws java.io.IOException;",
"@Override\n public Enumeration<URL> getResources(String name) throws IOException {\n if (\"META-INF/serv... | [
"0.6187413",
"0.60107476",
"0.5899473",
"0.5701631",
"0.55862254",
"0.55718076",
"0.53878796",
"0.5363629",
"0.5290611",
"0.5279825",
"0.5267815",
"0.52223927",
"0.5192684",
"0.51727664",
"0.5159671",
"0.51412594",
"0.5118421",
"0.51180696",
"0.51180696",
"0.5096378",
"0.5075... | 0.51563144 | 15 |
TODO: make a BranchType.TRUNK_EXTERNAL that points to externalModules directory and config this repo to use it PS: do this for CNPRC too when it gets added | private Repository getSnprcEhrModulesRepository()
{
RepositoryBuilder repoBuilder = new RepositoryBuilder("optionalModules", "snprcEHRModules", LicenseType.APACHE_LICENSE, BranchType.TRUNK);
repoBuilder.setDirectoriesToIgnore(
set(
"snprc_scheduler"
)
);
return repoBuilder.buildRepository();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.... | [
"0.5411718",
"0.5280114",
"0.52708143",
"0.5223038",
"0.5128177",
"0.5015012",
"0.4891581",
"0.4888447",
"0.4863935",
"0.48480254",
"0.48266867",
"0.4826038",
"0.4810693",
"0.4803283",
"0.47891876",
"0.478885",
"0.47583556",
"0.4742183",
"0.47240624",
"0.47183836",
"0.4718241... | 0.5018704 | 5 |
REPOSITORIES THAT NEED LABKEY LICENSE | private Repository getAssayReportRepository()
{
RepositoryBuilder repoBuilder = new RepositoryBuilder("optionalModules", "assayreport", LicenseType.LABKEY_LICENSE, BranchType.TRUNK);
return repoBuilder.buildRepository();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onShowLicences();",
"License createLicense();",
"public String getLicense();",
"@Override\n\tpublic final void checkLicense() {\n\t}",
"public String marriageLicenseSearchResult() {\n MarriageRegister marriageRegister = marriageRegistrationService.getByIdUKey(marriageIdUKey, user);\n ... | [
"0.6249059",
"0.61511636",
"0.60978776",
"0.5762767",
"0.56751585",
"0.56594056",
"0.5647215",
"0.5601854",
"0.5543026",
"0.5539105",
"0.5443693",
"0.54200786",
"0.5399868",
"0.53980577",
"0.5382024",
"0.53696877",
"0.5341132",
"0.5310704",
"0.5291265",
"0.52842534",
"0.52598... | 0.4774888 | 81 |
TODO: make a BranchType.TRUNK_REMOTEAPI that points to remoteapi directory and config this repo to use it | private Repository getLabkeyApiJdbcRepository()
{
RepositoryBuilder repoBuilder = new RepositoryBuilder("optionalModules", "labkey-api-jdbc", LicenseType.LABKEY_LICENSE, BranchType.TRUNK);
return repoBuilder.buildRepository();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ApiInterface {\n\n //Account API\n String ping(OkHttpClient client);\n\n String obtainAuthToken(OkHttpClient client, String username, String password);\n\n JSONObject checkAccountInfo(OkHttpClient client, String token);\n\n JSONObject getServerInformation(OkHttpClient client);\n\n ... | [
"0.5638965",
"0.55598557",
"0.5498987",
"0.53023756",
"0.52320784",
"0.5230058",
"0.52089745",
"0.5187855",
"0.5181277",
"0.51701736",
"0.51444244",
"0.5020192",
"0.5012649",
"0.49834722",
"0.49795756",
"0.49704543",
"0.4969469",
"0.4964181",
"0.49621686",
"0.49068353",
"0.48... | 0.0 | -1 |
=========== END OF PARAMETERS YOU MAY WANT TO TWEAK =========== | private static HashSet<String> set(String... s)
{
return new HashSet<>(Arrays.asList(s));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void setupParameters() {\n \n \n\n }",
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"private stendhal() {\n\t}",
"void setParameters() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \... | [
"0.6205683",
"0.60387033",
"0.5959448",
"0.59215343",
"0.58649087",
"0.5846998",
"0.583183",
"0.5764812",
"0.57361823",
"0.57225484",
"0.5703724",
"0.5697033",
"0.5697033",
"0.5697033",
"0.5697033",
"0.5697033",
"0.5697033",
"0.5697033",
"0.566912",
"0.5668989",
"0.566833",
... | 0.0 | -1 |
/ Initializes the library to work with a repository via different protocols. | private static void setupLibrary() {
/*
* For using over http:// and https://
*/
DAVRepositoryFactory.setup();
/*
* For using over svn:// and svn+xxx://
*/
SVNRepositoryFactoryImpl.setup();
/*
* For using over file:///
*/
FSRepositoryFactory.setup();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void initRepository() {\n deserialize();\n if (flightRepository == null) {\n flightRepository = new FlightRepository();\n }\n }",
"private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}",
"void setRepository(Repository repository);",
"privat... | [
"0.6679034",
"0.6325857",
"0.62568104",
"0.6241652",
"0.61901844",
"0.61730427",
"0.6140701",
"0.6137796",
"0.613448",
"0.60352314",
"0.60290277",
"0.60015625",
"0.5965958",
"0.5956322",
"0.58782977",
"0.58583707",
"0.58324337",
"0.5827071",
"0.5817784",
"0.58080614",
"0.5804... | 0.73045367 | 0 |
/ Called recursively to obtain all entries that make up the repository tree repository an SVNRepository which interface is used to carry out the request, in this case it's a request to get all entries in the directory located at the path parameter; path is a directory path relative to the repository location path (that is a part of the URL used to create an SVNRepository instance); | static void processSVNFiles(final ThreadContext context, final Repository repository, final Configuration config, final String path, final long previousRevision, long latestRevision) throws SVNException
{
/*
* Gets the contents of the directory specified by path at the latest
* revision (for this purpose -1 is used here as the revision number to
* mean HEAD-revision) getDir returns a Collection of SVNDirEntry
* elements. SVNDirEntry represents information about the directory
* entry. Here this information is used to get the entry name, the name
* of the person who last changed this entry, the number of the revision
* when it was last changed and the entry type to determine whether it's
* a directory or a file. If it's a directory listEntries steps into a
* next recursion to display the contents of this directory. The third
* parameter of getDir is null and means that a user is not interested
* in directory properties. The fourth one is null, too - the user
* doesn't provide its own Collection instance and uses the one returned
* by getDir.
*/
SVNRepository svnRepository = context.getSVNRepository();
final RendererMap renderers = config.getRenderers();
//noinspection unchecked
List<SVNDirEntry> entries = new ArrayList<>(svnRepository.getDir(path, -1, null, (Collection) null));
Collections.sort(entries);
List<String> directories = new ArrayList<>(entries.size());
for (final SVNDirEntry entry : entries)
{
if (entry.getKind() == SVNNodeKind.FILE)
{
String name = entry.getName();
int index = name.lastIndexOf('.');
final String extension = index != -1 ? name.substring(index).toLowerCase() : ""; // No extension case
final String filePath = createFilePath(path, name);
if (!renderers.containsKey(extension) || !config.isAllowedFile(filePath))
{
addFile(_skippedFileCounts, extension);
continue;
}
else
{
addFile(_checkedFileCounts, extension);
}
LicenseRenderer renderer = renderers.get(extension);
try
{
svnRepository.log(new String[]{filePath}, previousRevision, latestRevision, false, false, 1, svnLogEntry -> {
File file = new File(repository.getSourceDir(), filePath);
Extractor extractor = config.getExtractor(context);
Date createDate = extractor.getYear1(filePath, svnLogEntry);
String year2 = context.getYear(extractor.getYear2(filePath, entry));
String author = extractor.getAuthor(filePath, svnLogEntry);
readRepoFile(file, filePath, renderer, createDate, year2, author, context, repository);
});
}
catch(Exception e)
{
e.printStackTrace();
}
}
else if (entry.getKind() == SVNNodeKind.DIR)
{
String filePath = createFilePath(path, entry.getName());
if (config.isAllowedDirectory(filePath))
directories.add(filePath);
}
}
for (String directory : directories)
exec.execute(new SVNLicenseRunnable(repository, config, directory, previousRevision, latestRevision));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<DirectoryEntry> listAllDirEntries(OkHttpClient client, String token, String repo_id);",
"@Override\n\tpublic List<Resource> queryForTree() throws Exception {\n\t\treturn sResourceJDao.tree(null);\n\t}",
"List<CMSObject> getNodeByPath(String path, ConnectionInfo connectionInfo) throws RepositoryAccessExcep... | [
"0.60268277",
"0.5394073",
"0.53643066",
"0.5257665",
"0.519664",
"0.5169293",
"0.5167997",
"0.5166956",
"0.5137941",
"0.51350445",
"0.50836885",
"0.50836885",
"0.50803083",
"0.4991576",
"0.49881795",
"0.4976651",
"0.49713328",
"0.49679592",
"0.49280256",
"0.4923968",
"0.4911... | 0.5288418 | 3 |
Discard all characters from separator to the end of the string | private static String truncateAfter(String s, String separator)
{
int idx = s.toLowerCase().indexOf(separator.toLowerCase());
return (idx > -1 ? s.substring(0, idx) : s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String trimIgnoreChars(StringBuilder tokenBuilder) {\n\t\t\tint lastCharacterIdx = tokenBuilder.length()-1;\n\t\t\twhile(tokenBuilder.length()>0 && \n\t\t\t\t\tIGNORE_CHARS.contains(Character.valueOf(tokenBuilder.charAt(lastCharacterIdx)))) {\n\t\t\t\ttokenBuilder.deleteCharAt(lastCharacterIdx);\n\t\t\t\tl... | [
"0.63452435",
"0.58155096",
"0.56865096",
"0.5654885",
"0.5653702",
"0.5624429",
"0.56175405",
"0.5533244",
"0.5428645",
"0.53742653",
"0.5368959",
"0.53426427",
"0.5314675",
"0.5270468",
"0.52593756",
"0.524198",
"0.5200811",
"0.5198548",
"0.51866955",
"0.5178217",
"0.516745... | 0.59489626 | 1 |
/ =========================LICENSE_START================================== heimdallmiddlewarespec ======================================================================== Copyright (C) 2018 Conductor Tecnologia SA ======================================================================== Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==========================LICENSE_END=================================== This interface provides methods to control a StackTrace. | public interface StackTrace {
/**
* Gets the class from which the stack is tracking.
*
* @return The name of the class
*/
public String getClazz();
/**
* Sets the class from which the stack should tracking.
*
* @param clazz The name of the class
*/
public void setClazz(String clazz);
/**
* Gets the current message from the StackTrace.
*
* @return The message
*/
public String getMessage();
/**
* Sets a message to the StackTrace.
*
* @param message The message
*/
public void setMessage(String message);
/**
* Gets the current stack.
*
* @return The current stack
*/
public String getStack();
/**
* Sets the current stack.
*
* @param stack The new stack
*/
public void setStack(String stack);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void trace(Object message, Throwable t) {\n\n\t}",
"String getLogStackTrace();",
"@Override\n\tpublic void trace(Message msg, Throwable t) {\n\n\t}",
"static void assignTrace(Pipe pipe, Throwable ex) {\n\n StackTraceElement[] trace = ex.getStackTrace();\n int traceLength = t... | [
"0.5597087",
"0.5591977",
"0.5564948",
"0.5560539",
"0.55593914",
"0.5543561",
"0.5526226",
"0.5508831",
"0.54642487",
"0.54551154",
"0.5454991",
"0.5454148",
"0.54438645",
"0.5439501",
"0.5432388",
"0.54166216",
"0.5416389",
"0.53960687",
"0.5365658",
"0.5348942",
"0.5339758... | 0.68467164 | 0 |
Gets the class from which the stack is tracking. | public String getClazz(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PerformanceSensitive\n public static Class<?> getCallerClass(final int depth) {\n return stackLocator.getCallerClass(depth + 1);\n }",
"public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" ... | [
"0.7080862",
"0.68672436",
"0.6753832",
"0.6735711",
"0.67109853",
"0.66864127",
"0.6685116",
"0.66450614",
"0.6626118",
"0.6608183",
"0.6595806",
"0.6575079",
"0.6575079",
"0.6540558",
"0.65393347",
"0.65254146",
"0.651465",
"0.64976746",
"0.6492306",
"0.64694697",
"0.645142... | 0.0 | -1 |
Sets the class from which the stack should tracking. | public void setClazz(String clazz); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setClass_(String newValue);",
"void setClassType(String classType);",
"public void setClass (\r\n String strClass) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public final void mT__275() throws RecognitionException {\r\n try {\r\n int _ty... | [
"0.69228405",
"0.66577387",
"0.64009374",
"0.64008164",
"0.630975",
"0.63082147",
"0.62631685",
"0.62344843",
"0.6043614",
"0.6019978",
"0.6005796",
"0.59881973",
"0.5972402",
"0.5970601",
"0.5970129",
"0.59644765",
"0.5943199",
"0.5932485",
"0.5921997",
"0.59005237",
"0.5885... | 0.61261094 | 8 |
Gets the current message from the StackTrace. | public String getMessage(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getTheMessage();",
"Message getCurrentMessage();",
"public String getMessage() {\r\n return messageKind.getMessage();\r\n }",
"public java.lang.String getMessage() {\n return localMessage;\n }",
"public String getMessage() {\n\t\treturn this.nbt.getString(MESSAG... | [
"0.7345396",
"0.7318101",
"0.73148465",
"0.7229162",
"0.72123915",
"0.712382",
"0.702313",
"0.7007312",
"0.7001956",
"0.69924897",
"0.69924897",
"0.69872016",
"0.6970232",
"0.6963423",
"0.6962452",
"0.6958818",
"0.69291097",
"0.6916999",
"0.6916999",
"0.6916999",
"0.6916999",... | 0.0 | -1 |
Sets a message to the StackTrace. | public void setMessage(String message); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void setMessage(java.lang.String message)\n\t{\n\t\tsetMessage(getContext(), message);\n\t}",
"private void setMessage(final String message) {\n }",
"void setMessage(String message);",
"void setMessage(String message);",
"public void setMessage(String message) {\n\t\tthis.nbt.setString(MESS... | [
"0.7169509",
"0.70893866",
"0.7065368",
"0.7065368",
"0.6802353",
"0.67039",
"0.6635042",
"0.66122895",
"0.66027004",
"0.659031",
"0.65681064",
"0.65482444",
"0.65018916",
"0.6501533",
"0.64772165",
"0.64549094",
"0.64412796",
"0.6431485",
"0.6378659",
"0.63599575",
"0.635644... | 0.6918885 | 4 |
Gets the current stack. | public String getStack(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Stack getStack() {\r\n\t\treturn stack;\r\n\t}",
"public StackInterface Stack() { return mStack; }",
"@VisibleForTesting\n public TaskStack getTopStack() {\n return this.mTaskStackContainers.getTopStack();\n }",
"public Vector<Command> getStack() {\r\n\t\treturn stack;\r\n\t}",
"private... | [
"0.8111401",
"0.77077645",
"0.7388001",
"0.73746365",
"0.7330567",
"0.7260807",
"0.712609",
"0.69284666",
"0.6903251",
"0.68798363",
"0.6878609",
"0.6874721",
"0.6843786",
"0.6827616",
"0.68217057",
"0.6808094",
"0.6799144",
"0.67728525",
"0.6747752",
"0.6714685",
"0.669535",... | 0.7562853 | 2 |
Sets the current stack. | public void setStack(String stack); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setStack(JainTcapStack stack);",
"public void setStack(int slot, Stack stack);",
"public void setStack(int loc) {\n stackRegister = loc;\n }",
"public DraggableBehavior setStack(String stack)\n\t{\n\t\tthis.options.putLiteral(\"stack\", stack);\n\t\treturn this;\n\t}",
"@Override\n\tpublic v... | [
"0.76986206",
"0.7356446",
"0.73195475",
"0.6721217",
"0.6638812",
"0.66279805",
"0.66176456",
"0.66003555",
"0.6432053",
"0.64167994",
"0.638626",
"0.62818694",
"0.61990345",
"0.595162",
"0.5870734",
"0.5841828",
"0.5841828",
"0.5841828",
"0.5841276",
"0.5839109",
"0.5831356... | 0.772547 | 0 |
System.out.println("Open from " + session + " sessionhandler=" + sessionHandler); | @OnOpen
public void open(Session session) {
sessionHandler.addSession(session);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onOpenSession(Session session);",
"public void sessionOpened(IoSession session) {\n \tSystem.out.println(\"http session open\");\n }",
"java.lang.String getSessionHandle();",
"@OnOpen\r\n public void onOpen(Session session) {\n try {\r\n \tClientRequest.session=session;\r\n// ... | [
"0.71765935",
"0.7130833",
"0.69516253",
"0.69455487",
"0.65645397",
"0.63652",
"0.6306962",
"0.62480074",
"0.6212931",
"0.61932975",
"0.6048233",
"0.6048233",
"0.60145414",
"0.60138917",
"0.5981456",
"0.59804463",
"0.5961791",
"0.5936585",
"0.5929276",
"0.59198296",
"0.59004... | 0.6250944 | 7 |
System.out.println("Close from " + session+ " sessionhandler=" + sessionHandler); | @OnClose
public void close(Session session) {
sessionHandler.removeSession(session);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void closeSession();",
"void closeSession();",
"public void sessionEnded() {\n\t\t\r\n\t}",
"@OnClose\n public void onClose(Session session) {\n if (WebsocketServer.session == session) {\n System.out.println(\"Session \" +session.getId()+\" has ended\");\n }\n }",
"private static void... | [
"0.718865",
"0.718865",
"0.70449466",
"0.6844303",
"0.6743677",
"0.66571015",
"0.6656003",
"0.66518825",
"0.6621704",
"0.6604969",
"0.6595248",
"0.6580987",
"0.6577306",
"0.6556399",
"0.6537362",
"0.65280414",
"0.6357327",
"0.6319263",
"0.6319263",
"0.62925637",
"0.6285183",
... | 0.6060616 | 34 |
message = message.replace('\'', '"'); | @OnMessage
public void handleMessage(String message, Session session) {
System.out.println("Received: " + message);
try{
// We always expect a single json object - all our commands are routed in via this mechanism, with each command having a different root json object name
JsonReader jsonReader = Json.createReader(new StringReader(message));
JsonObject o = jsonReader.readObject();
// Every command should have an auth value on it...
String auth = o.getString("auth");
//System.out.println("Auth is " + auth);
if (!sessionHandler.validAccounts.contains(auth))
{
session.getBasicRemote().sendText("{\"noauth\":true}");
throw new Exception("Invalid auth");
}
// See what command the client has sent me - the name of the object denotes the command
JsonObject console = o.getJsonObject("console");
if (null != console)
{
ConsoleInfo ci = new ConsoleInfo();
ci.name = console.getString("name");
sessionHandler.addConsoleInfo(session, ci);
}
JsonObject reset = o.getJsonObject("reset");
if (null != reset)
{
if (reset.getString("type").equals("full"))
{
// Clear out the registered devices
Devices.d.removeAll();
}
else
{
Devices.d.remove(reset.getString("number"));
}
}
JsonObject deleteaudio = o.getJsonObject("deleteaudio");
if (null != deleteaudio)
{
// remove this audio
Audios.a.remove(deleteaudio.getString("name"));
}
JsonObject addaudiofolder = o.getJsonObject("addfolder");
if (null != addaudiofolder)
{
// Create a folder on disk
String folder = addaudiofolder.getString("folder");
String newName = addaudiofolder.getString("name");
File uploads = new File(Settings.s.uploadDiskPath + "/" + (folder.length()==0?"" : folder + "/") + newName);
// Prevent traversals
if (!uploads.getParentFile().toPath().startsWith(new File(Settings.s.uploadDiskPath).toPath()))
{
// Naughty!
throw new ServletException("Cannot save to " + uploads.getParentFile().toPath());
}
// Create the folder if necessary
if (!uploads.exists())
{
uploads.mkdirs();
}
// And tell everyone about it...
Audios.a.add(uploads.toString(), newName, folder, true);
}
JsonObject playaudio = o.getJsonObject("playaudio");
if (null != playaudio)
{
// Play this audio to the listed devices
String audio = playaudio.getString("audio");
JsonArray devices = playaudio.getJsonArray("devices");
Audio a = Audios.a.get(audio);
if (null != a)
{
// TODO - pass the array to Plivo instead of looping here, as I think the play API can take an array...
for (JsonValue device : devices)
{
Device d = Devices.d.get(device.toString());
// Is this a folder? If so, pick a random child audio, preferring one that this device has not had
if (a.isFolder)
{
a = Audios.a.getRandomChild(a, d);
}
// We should be able to handle ringing calls here
if (null != d)
d.MakeCall(a);
}
}
}
JsonObject patch = o.getJsonObject("patch");
if (null != patch)
{
// Connect this active device to an idle device, or connect 2 idle devices together
JsonArray devices = patch.getJsonArray("devices");
Devices.patch(devices.get(0).toString(), devices.get(1).toString());
}
JsonObject playtext = o.getJsonObject("playtext");
if (null != playtext)
{
// As playAudio, but for sms - and the text can be edited in the console and not saved...
String text = playtext.getString("text");
String activetext = playtext.getString("activetext");
Text atext = Texts.t.get(activetext);
JsonArray devices = playtext.getJsonArray("devices");
if (!text.isEmpty())
{
for (JsonValue device : devices)
{
Device d = Devices.d.get(device.toString());
if (null != d)
d.Sms(text, atext);
}
}
}
JsonObject ignore = o.getJsonObject("ignore");
if (null != ignore)
{
JsonArray devices = ignore.getJsonArray("devices");
for (JsonValue device : devices)
{
Devices.hangup(device.toString(),"failed","Request from console");
}
}
JsonObject deletetext = o.getJsonObject("deletetext");
if (null != deletetext)
{
Texts.t.remove(deletetext.getString("name"));
}
JsonObject savetext = o.getJsonObject("savetext");
if (null != savetext)
{
Texts.t.add(savetext.getString("label"),savetext.getString("name"));
}
JsonObject updatestatus = o.getJsonObject("updatestatus");
if (null != updatestatus)
{
Devices.updateStatus();
}
JsonObject savedevice = o.getJsonObject("savedevice");
if (null != savedevice)
{
Devices.updateName(savedevice.getString("number"), savedevice.getString("name"));
}
JsonObject saveprogress = o.getJsonObject("saveprogress");
if (null != saveprogress)
{
Devices.updateProgress(saveprogress.getString("number"), saveprogress.getString("progress"));
}
JsonObject setmessagesread = o.getJsonObject("setmessagesread");
if (null != setmessagesread)
{
Devices.setMessagesRead(setmessagesread.getString("number"));
}
JsonObject savegoal = o.getJsonObject("savegoal");
if (null != savegoal)
{
Goals.add(savegoal);
}
JsonObject deletegoal = o.getJsonObject("deletegoal");
if (null != deletegoal)
{
Goals.remove(deletegoal.getString("name"));
}
JsonObject uncue = o.getJsonObject("uncue");
if (null != uncue)
{
Devices.uncue(uncue.getString("number"));
}
JsonObject register = o.getJsonObject("register");
if (null != register)
{
Devices.d.add(register.getString("number"),"console");
}
// IVR commands from the console
JsonObject saveivrstep = o.getJsonObject("saveivrstep");
if (null != saveivrstep)
{
IvrSteps.i.add(saveivrstep).saveToDisk();
}
JsonObject deleteivrstep = o.getJsonObject("deleteivrstep");
if (null != deleteivrstep)
{
IvrSteps.i.remove(deleteivrstep.getString("name"));
}
// System-wide settings
JsonObject setting = o.getJsonObject("setting");
if (null != setting)
{
Switchboard.s.parseJson(setting);
Switchboard.s.persist();
// Tell everyone about this...
sessionHandler.Broadcast(o);
// And do any heartbeat changes that I need
Switchboard.s.setupHeartbeat(true);
}
}
catch (Exception e)
{
System.out.println("Failed to parse " + message + " with error " + e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String replaceSingleQuotes(String toReplace) {\n if (!StringUtils.isBlank(toReplace)) {\n return toReplace.replaceAll(\"'\", \"\");\n } else {\n return toReplace;\n }\n\n }",
"private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }",
"private... | [
"0.6467395",
"0.64273864",
"0.6417188",
"0.6411069",
"0.62459004",
"0.61953646",
"0.61018926",
"0.6092406",
"0.6078616",
"0.60656846",
"0.6033048",
"0.60048246",
"0.5982299",
"0.5960096",
"0.5858332",
"0.5852551",
"0.58479965",
"0.5806848",
"0.57774645",
"0.5762683",
"0.57503... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_search, container, false);
ButterKnife.bind(this,view);
imgSingleMeal.setOnClickListener(this);
imgIngredients.setOnClickListener(this);
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 |
Important that param `bindingResult` should be before `model`. | @PostMapping("/main")
public String add(
@AuthenticationPrincipal User user,
@Valid Message message,
BindingResult bindingResult,
Model model
) {
message.setAuthor(user);
if (bindingResult.hasErrors()) {
final Map<String, String> errors = ControllerUtils.getErrors(bindingResult);
model.mergeAttributes(errors);
model.addAttribute("message", message);
} else {
model.addAttribute("message", null);
msgRepo.save(message);
}
final Iterable<Message> msgs = msgRepo.findAll();
model.addAttribute("messages", msgs);
return "main";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void bind( final ModelData model );",
"public final BindingResult getBindingResult() {\n return bindingResult;\n }",
"protected void prepareModel() {\n model();\n }",
"protected abstract void bindingView();",
"private void performBinding() {\n mViewDataBinding.setVariable(getBind... | [
"0.6554241",
"0.6259666",
"0.5969271",
"0.5868822",
"0.5823988",
"0.57562286",
"0.5701342",
"0.5592087",
"0.5566472",
"0.55216724",
"0.550916",
"0.5413544",
"0.53877884",
"0.5357497",
"0.52986765",
"0.5292009",
"0.52733874",
"0.5249045",
"0.52129704",
"0.52085423",
"0.516392"... | 0.0 | -1 |
create textfield input like "GroceryList.txt" create file chooser function | @Test
void searchListButtonClicked() {
//if file chooser function finds GroceryList.txt
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FileChooserField() {\n \n \tsuper(new BorderLayout());\n \n destinationTextField = new JTextField();\n destinationTextField.addMouseListener(new MouseAdapter() {\n // on mouse click pull up the file chooser\n public void mouseClicked(MouseEvent e) {\n int retu... | [
"0.65647817",
"0.6486789",
"0.6413012",
"0.6348165",
"0.6348096",
"0.6317126",
"0.6275242",
"0.62511265",
"0.62442493",
"0.6189727",
"0.6179056",
"0.61690193",
"0.6092085",
"0.608811",
"0.60783947",
"0.6057991",
"0.6056726",
"0.60504884",
"0.60256225",
"0.6007615",
"0.5989078... | 0.60129625 | 19 |
TODO code application logic here | public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt();
int[] freeway = new int[n];
for (int l = 0; l < freeway.length; ++l) {
freeway[l] = scan.nextInt();
}
while (k > 0) {
int i = scan.nextInt();
int j = scan.nextInt();
int largest = 3;
for (int f = i; f<=j; ++f){
if (freeway[f]< largest){
largest = freeway[f];
}
}
System.out.println(largest);
k--;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }"... | [
"0.60802186",
"0.5912082",
"0.58425087",
"0.58339286",
"0.5810548",
"0.57580656",
"0.57396024",
"0.5721001",
"0.5705411",
"0.5666017",
"0.5657976",
"0.5613798",
"0.5611188",
"0.5611188",
"0.55960613",
"0.55933475",
"0.557677",
"0.5572332",
"0.5565667",
"0.55482084",
"0.553657... | 0.0 | -1 |
/ Positive tests on login functionality | @Test
public void loginWithValidCredentials(){
app.loginScreen().waitUntilLoaded();
app.loginScreen().logIn(Credentials.USER_VALID.username, Credentials.USER_VALID.password);
assertTrue(app.userDashboardScreen().isActive());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testLogin() {\n login(datum.junit);\n\t}",
"public void testLogin() throws Exception {\n super.login();\n }",
"@Test\r\n\tpublic void testLogin1() {\r\n\t\tassertFalse(t1.login(\"\", \"pass\"));\t\r\n\t}",
"@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(... | [
"0.79540163",
"0.79074895",
"0.7816019",
"0.7779871",
"0.7778201",
"0.7770649",
"0.76821613",
"0.7647143",
"0.76175904",
"0.76162755",
"0.7609682",
"0.75990456",
"0.7579651",
"0.753683",
"0.75168043",
"0.74588925",
"0.74383116",
"0.7430996",
"0.74292296",
"0.74286467",
"0.736... | 0.77235305 | 6 |
/ Negative tests on login functionality | @Test
public void loginWithInvalidCredentials(){
app.loginScreen().waitUntilLoaded();
app.loginScreen().logIn(Credentials.USER_INVALID.username, Credentials.USER_INVALID.password);
assertTrue(app.loginScreen().isActive());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void loginNegative() throws Exception{\n loginPage.login(ConfigurationReader.getProperty(\"sales_manager_username\"), ConfigurationReader.getProperty(\"invalidPassword!\"));\n\n //Error message\n String err = \"Invalid user name or password.\";\n Assert.assertTrue(logi... | [
"0.79317933",
"0.7632557",
"0.7574332",
"0.74330103",
"0.7410895",
"0.74039936",
"0.73854417",
"0.73279494",
"0.7294154",
"0.72730005",
"0.7267148",
"0.7267148",
"0.7252912",
"0.7234747",
"0.7213044",
"0.7204221",
"0.7175236",
"0.7167755",
"0.7110573",
"0.709655",
"0.7093884"... | 0.7475723 | 3 |
METODOS GETTERS E SETTERS | public double getLimiteCorrente () {
return limiteCorrente;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Set method_1559();",
"public void setdat()\n {\n }",
"private void assignment() {\n\n\t\t\t}",
"String setValue();",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"private void setData() {\n\n }",
"public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* ... | [
"0.69175005",
"0.65966034",
"0.64333487",
"0.6295228",
"0.6223776",
"0.62236166",
"0.61106443",
"0.6080445",
"0.60514957",
"0.6048436",
"0.6039686",
"0.60243857",
"0.6000311",
"0.59762883",
"0.59680223",
"0.59446615",
"0.5924456",
"0.5913513",
"0.5908862",
"0.5891009",
"0.587... | 0.0 | -1 |
METODOS DE DEPOSITO E SAQUE | public void deposito (double valor) {
setSaldoConta(getLimiteCorrente()+getSaldoConta()+valor);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void makeDeposit() {\n\t\t\r\n\t}",
"private void funcaoTotalPedido() {\n\n ClassSale.paymentCoupon(codeCoupon);\n BigDecimal smallCash = PaymentCoupon.getSmallCash();\n\n jTextValueTotalCoupon.setText(v.format(PaymentCoupon.getTotalCoupon()));\n \n jTextSmallCash.setTe... | [
"0.6688111",
"0.6541629",
"0.6521575",
"0.6362271",
"0.63165975",
"0.6308585",
"0.6281521",
"0.6277096",
"0.6216893",
"0.6216562",
"0.6205118",
"0.6100579",
"0.60735077",
"0.60621953",
"0.605974",
"0.6040837",
"0.60406923",
"0.60379976",
"0.60237277",
"0.60077804",
"0.6006325... | 0.5811375 | 43 |
EXTERNAL VARIABLES EXTERNAL FUNCTIONS / Get total CPU time in seconds breaking it down by user and system time. | public void getSecsDetail( ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getCPU_time();",
"public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}",
"public static double doCPU_usage() {\n double totalProgramRunTime = endProgramTime - startProgramTime;\n return (processingTimeTotal / totalProgramRunTime) * 100;\n }",
"Optional<Duratio... | [
"0.7835246",
"0.7824202",
"0.7406318",
"0.7403551",
"0.7344666",
"0.73431736",
"0.7342079",
"0.73025525",
"0.72870547",
"0.7278139",
"0.7234521",
"0.7122293",
"0.7110775",
"0.7102644",
"0.7100761",
"0.70629466",
"0.7062155",
"0.70527816",
"0.7040737",
"0.69988334",
"0.6995671... | 0.0 | -1 |
/ Get total CPU time in seconds including user and system time. | public double getSecs( ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}",
"public static long getCpuTime(){\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ?\n bean.getCurrentThreadCpuTime() : 0L;\n }",
"public ... | [
"0.82062006",
"0.79127103",
"0.7893994",
"0.7882889",
"0.78643763",
"0.7851454",
"0.7807021",
"0.7715582",
"0.76594824",
"0.76014024",
"0.7586246",
"0.7541612",
"0.7515346",
"0.74765885",
"0.74553865",
"0.74229646",
"0.73927975",
"0.7347169",
"0.7344404",
"0.7250778",
"0.7204... | 0.0 | -1 |
/ Report the total secons time in a nicer hr, min sec format with a string to label what the time is for. | public void reportTimes( String filename,
double tot_secs,
String str ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getFormattedTime(int totalElapsedSeconds)\n {\n int minutes = totalElapsedSeconds / 60;\n int seconds = totalElapsedSeconds - (minutes * 60);\n String timerText = String.format(\"%02d\", minutes)\n + \":\" + String.format(\"%02d\", s... | [
"0.684496",
"0.65775335",
"0.65079844",
"0.6471255",
"0.6440889",
"0.6411632",
"0.640479",
"0.63941664",
"0.6388985",
"0.63742465",
"0.6366309",
"0.6363539",
"0.6353343",
"0.6346856",
"0.6346856",
"0.63129216",
"0.62722385",
"0.6245988",
"0.6196785",
"0.6196418",
"0.6191697",... | 0.5786607 | 72 |
Connection connection = JdbcUtil.getConnection(); log.info("=============="+String.valueOf(connection.getClientInfo())); | @Test
public void test() throws SQLException {
String str = "t_table";
log.info("str:============"+str.substring(2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getConnection();",
"String getConnection();",
"String getConnection();",
"String getConnection();",
"String getConnection();",
"public String getConnectionDetails() {\n return getName();\n }",
"public String getConnection()\n {\n return this.connection;\n }",
"@Ov... | [
"0.70194167",
"0.6849192",
"0.6849192",
"0.6849192",
"0.6849192",
"0.67399263",
"0.6684224",
"0.66483283",
"0.6647902",
"0.65616775",
"0.6546789",
"0.6506765",
"0.6490428",
"0.64787847",
"0.64787847",
"0.6466974",
"0.64394134",
"0.6431132",
"0.638532",
"0.6368157",
"0.6368157... | 0.0 | -1 |
read in the edge list | public void readIn() throws FileNotFoundException{
Scanner sc;
if (species.equals("Human")){
sc= new Scanner(PhenoGeneNetwork.class.getResourceAsStream("/GenePhenoEdgeList"));
}
else{
sc= new Scanner(PhenoGeneNetwork.class.getResourceAsStream("/GenePhenoEdgeListMouse"));
}
nodeNameMap = new HashMap<String, CyNode>();
proteinNameMap = new HashMap<String, CyNode>();
phenotypeNameMap = new HashMap<String, CyNode>();
while (sc.hasNextLine()){
String line = sc.nextLine();
String [] nodes = line.split("\t");
CyNode node1 = null;
CyNode node2 = null;
// for Node1
if (nodeNameMap.containsKey(nodes[0])){
node1 = (CyNode) nodeNameMap.get(nodes[0]);
}
else {
node1 = network.addNode();
CyRow attributes = network.getRow(node1);
attributes.set("name", nodes[0]);
nodeNameMap.put(nodes[0], node1);
phenotypeNameMap.put(nodes[0], node1);
}
if (nodeNameMap.containsKey(nodes[1])){
node2 = (CyNode) nodeNameMap.get(nodes[1]);
}
else {
node2 = network.addNode();
CyRow attributes = network.getRow(node2);
attributes.set("name", nodes[1]);
nodeNameMap.put(nodes[1], node2);
proteinNameMap.put(nodes[1], node2);
}
if (!network.containsEdge(node1, node2)){
CyEdge myEdge =network.addEdge(node1, node2, true);
network.getRow(myEdge).set("interaction", "phenotype");
network.getRow(myEdge).set("name", nodes[0]+ " (phenotype) " +nodes[1]);
}
}
sc.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void readEdges(){\n for ( j= 0;j<edgesNum;j++){\n lineElements = lines.get(j+2).split(\" \");\n // System.out.println(lineElements[0]+\" \"+lineElements[1]);\n int start = Integer.parseInt(lineElements[0])-1;\n int end = Integer.parseInt(lineElements[1])-... | [
"0.7537001",
"0.68918556",
"0.67737013",
"0.67271835",
"0.6694073",
"0.6627794",
"0.64524084",
"0.63983476",
"0.63319045",
"0.6327859",
"0.6326001",
"0.6296567",
"0.62946004",
"0.6236606",
"0.61956775",
"0.6192987",
"0.6169387",
"0.60715353",
"0.6038006",
"0.60352796",
"0.600... | 0.5770371 | 39 |
populate case search DB | @Test
public void testPurgeForTemporaryDb() throws Exception {
try (MockRequestUtils.VerifiedMock ignore = mockRequest.mockQuery(
"query_responses/case_claim_response.xml")) {
Response<EntityListResponse> response = navigate(new String[]{"1", "action 1"},
EntityListResponse.class);
}
SqlSandboxUtils.purgeTempDb(Instant.now());
// verify the case storage has been cleared
String cacheKey = "caseclaimdomain_caseclaimuser_http://localhost:8000/a/test/phone/search"
+ "/_case_type=case1=case2=case3_include_closed=False";
SQLiteDB caseSearchDb = new CaseSearchDB("caseclaimdomain", "caseclaimuser", null);
String caseSearchTableName = getCaseSearchTableName(cacheKey);
UserSqlSandbox caseSearchSandbox = new CaseSearchSqlSandbox(caseSearchTableName, caseSearchDb);
IStorageUtilityIndexed<Case> caseSearchStorage = caseSearchSandbox.getCaseStorage();
assertFalse(caseSearchStorage.isStorageExists(), "Case search storage has not been cleared after purge");
FormplayerCaseIndexTable caseSearchIndexTable = getCaseIndexTable(caseSearchSandbox, caseSearchTableName);
assertFalse(caseSearchIndexTable.isStorageExists(), "Case Indexes have not been cleared after purge");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void Searchdata() {\r\n Connection con;\r\n String searchby;\r\n String sortby;\r\n String keyword;\r\n \r\n searchby = (String)cboSearchby.getSelectedItem();\r\n sortby = (String)cboSortby.getSelectedItem();\r\n keyword = txfSearch.getText();\r\n ... | [
"0.60312945",
"0.5944495",
"0.5785229",
"0.5753073",
"0.5597582",
"0.5583191",
"0.5493457",
"0.5482092",
"0.54720527",
"0.5429221",
"0.542654",
"0.54081774",
"0.53856224",
"0.5375134",
"0.53747433",
"0.53662556",
"0.53518414",
"0.5322751",
"0.5299031",
"0.528361",
"0.52774954... | 0.0 | -1 |
Created by DeviceBee on 8/23/2017. | public interface SocketMessageListerner {
void onGetMessageAck(Message message, int type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\t... | [
"0.6151503",
"0.6088033",
"0.59813666",
"0.5971186",
"0.59057665",
"0.59040815",
"0.59040815",
"0.5863426",
"0.5826447",
"0.58179975",
"0.58179975",
"0.58179975",
"0.58179975",
"0.58179975",
"0.58179975",
"0.58179975",
"0.5811862",
"0.5796715",
"0.577605",
"0.57017064",
"0.56... | 0.0 | -1 |
Controi instancia da classe. | public FileInputTools(SharedBuffer buffer, int bufferInputFileLength) throws Exception {
super (buffer);
this.reset();
this.bufferInputFileLength = bufferInputFileLength;
this.initializeStream();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Instantiation(){}",
"Reproducible newInstance();",
"Constructor() {\r\n\t\t \r\n\t }",
"public Instance() {\n }",
"public Clade() {}",
"public Constructor(){\n\t\t\n\t}",
"public Curso() {\r\n }",
"Instance createInstance();",
"private ATCres() {\r\n // prevent to instantiate thi... | [
"0.8084842",
"0.76662964",
"0.73143345",
"0.72199917",
"0.7198058",
"0.71531624",
"0.7147384",
"0.7137932",
"0.7111757",
"0.7085457",
"0.7083589",
"0.7067222",
"0.70614725",
"0.7031879",
"0.70226365",
"0.7013346",
"0.6999977",
"0.69828594",
"0.69778305",
"0.6976555",
"0.69652... | 0.0 | -1 |
abstract path: exist or not | public static void main(String[] args) {
File f = new File("src/com/briup/java_day19/ch11/FileTest.txt");// "src/com/briup/"(win and linux)
System.out.println(f);
System.out.println(f.exists());
if(!f.exists()){
try {
f.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println(f.canWrite());
System.out.println(f.canExecute());
System.out.println(f.canRead());
System.out.println(f.getAbsolutePath());//override toString
System.out.println(f.getAbsoluteFile());
System.out.println(f.getName());
System.out.println(f.getParent());
System.out.println(f.getParentFile());
System.out.println(f.isDirectory());
System.out.println(f.isFile());
System.out.println(f.length());//how many byte
System.out.println("=================");
String[] str = f.getParentFile().list();
System.out.println(Arrays.toString(str));
for(String s:str){
System.out.println(s);
}
System.out.println("=================");
File pf = f.getParentFile();
String[] str2 = pf.list(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
//文件名以txt结尾的
// return name.endsWith("java");
// return name.contains("Byte");
return name.startsWith("Byte");
}
});
for(String s:str2){
System.out.println(s);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean isPath();",
"Path getHasPath();",
"@Override\n\tpublic boolean pathExists(String path) {\n\t\treturn false;\n\t}",
"protected abstract boolean pathExists(@NonNull String path, T context);",
"abstract public boolean exists( String path )\r\n throws Exception;",
"boolean exi... | [
"0.7978876",
"0.758551",
"0.7573901",
"0.72938776",
"0.72048897",
"0.7087531",
"0.70601636",
"0.6826982",
"0.6749152",
"0.6608659",
"0.65479606",
"0.6511952",
"0.64337295",
"0.63782084",
"0.6354358",
"0.6319034",
"0.6302266",
"0.6205299",
"0.6205299",
"0.6184818",
"0.6172091"... | 0.0 | -1 |
/ JTable uses this method to determine the default renderer/ editor for each cell. If we didn't implement this method, then the last column would contain text ("true"/"false"), rather than a check box. | public Class getColumnClass(int c)
{
return getValueAt(0, c).getClass();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface TableCellRenderer {\n\n /**\n * Returns the component used for drawing the cell. This method is\n * used to configure the renderer appropriately before drawing.\n *\n * @param\ttable\t\tthe <code>JTable</code> that is asking the \n *\t\t\t\trenderer to draw; can be <code>... | [
"0.6512678",
"0.6412899",
"0.63667977",
"0.6364341",
"0.62990975",
"0.6234915",
"0.6232758",
"0.62283355",
"0.6172555",
"0.61312497",
"0.6098486",
"0.6085549",
"0.608242",
"0.6081343",
"0.6081117",
"0.6031602",
"0.5986698",
"0.598027",
"0.59802675",
"0.5979133",
"0.5977153",
... | 0.0 | -1 |
/ Don't need to implement this method unless your table's editable. | public boolean isCellEditable(int row, int col)
{
//Note that the data/cell address is constant,
//no matter where the cell appears onscreen.
return this.getColumnClass(col) != String.class;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void tableChanged(TableModelEvent arg0) {\n\t\t\n\t}",
"@Override\r\n public void tableChanged(TableModelEvent e) {\n\r\n }",
"@Override\n public void tableRows_()\n {\n }",
"@Override\n public boolean isCellEditable(int row, int column) {\n ... | [
"0.7156143",
"0.7115108",
"0.7032567",
"0.6950706",
"0.69047433",
"0.68686193",
"0.6819342",
"0.68054986",
"0.66989887",
"0.66785896",
"0.66785896",
"0.6634151",
"0.660843",
"0.6607853",
"0.6607853",
"0.66067094",
"0.66062963",
"0.66062963",
"0.6606021",
"0.6583397",
"0.65779... | 0.0 | -1 |
if false, face down | public OptionsButtonPanel(JPopupMenu menu)
{
super();
thePanel = this;
//this.setBackground(Color.WHITE);
//Add a label saying "options"
//this.add(new JLabel("options"), BorderLayout.CENTER);
men = menu;
if (FACE_RIGHT)
{
//button = new BasicArrowButton(SwingConstants.EAST);
button = new IconButton("/icons/advanced_21.png", "options", null, "options");
button.setContentAreaFilled(false);
button.setMinimumSize(new Dimension(21, 21));
button.setPreferredSize(new Dimension(21, 21));
}
else
{
button = new IconButton("/icons/advanced_21.png", "options", null, "options");
//button = new BasicArrowButton(SwingConstants.SOUTH);
button.setContentAreaFilled(false);
button.setMinimumSize(new Dimension(21, 21));
button.setPreferredSize(new Dimension(21, 21));
}
this.add(button, BorderLayout.NORTH);
ActionListener al = new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
Point p = button.getLocationOnScreen();
if (FACE_RIGHT)
{
men.setLocation((int) p.getX() + button.getWidth(), (int) p.getY());
}
else
{
men.setLocation((int) p.getX(), (int) p.getY() + + button.getHeight());
}
men.setInvoker(thePanel);
men.setVisible(true);
}
};
button.addActionListener(al);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean turnFaceDown();",
"public void setFaceDown(){faceUp = false;}",
"public void flip(){\n this.faceDown = !this.faceDown;\n }",
"private void faceBackwards(){\n\t\tturnLeft();\n\t\tturnLeft();\n\t}",
"public boolean isFaceUp(){return faceUp;}",
"boolean turnFaceUp();",
"boolean isTurnedF... | [
"0.8744852",
"0.803907",
"0.7822425",
"0.7815211",
"0.7735569",
"0.77153325",
"0.7517635",
"0.742193",
"0.7308842",
"0.7184066",
"0.71191084",
"0.7076384",
"0.6872018",
"0.6867839",
"0.6834865",
"0.6758219",
"0.6661632",
"0.66539776",
"0.6603332",
"0.65888965",
"0.6546739",
... | 0.0 | -1 |
initial budget minus bet amount / wins / loss | public int getMoneyAfterBet() {
moneyAfterBet = initialBudget - betAmount;
// initialBudget = moneyAfterBet;
return moneyAfterBet;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void takeBetBack() {\n\t\ttotalMoney += bet;\n\t}",
"public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n ... | [
"0.7018264",
"0.65127116",
"0.64053375",
"0.64046013",
"0.635508",
"0.62897253",
"0.6272347",
"0.6229012",
"0.62067634",
"0.61952513",
"0.61429834",
"0.61154026",
"0.6100153",
"0.606137",
"0.60436857",
"0.60407287",
"0.602619",
"0.60205513",
"0.59921014",
"0.59909153",
"0.598... | 0.7256353 | 0 |
/ Behavior at filing: TQ warning thrown for explicitly checked (and annotated) parameter | @DesireNoWarning("TQ")
public void set(@CheckForSigned int possibleNegativeValue) {
if (possibleNegativeValue >= 0)
nonNegativeValue = possibleNegativeValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void warningPermit();",
"public synchronized static final void throwSetterSignatureWarning() {\r\n\r\n\t\tthrow new TestUtilWarningException(\"The setter signature has no parameter and can not be TestUtil verified.\");\r\n\t}",
"@Override\n\tpublic void onStallWarning(StallWarning arg0) {\n\t\t\n\t}",
... | [
"0.6716998",
"0.63043207",
"0.62932616",
"0.6257326",
"0.61688703",
"0.61639106",
"0.61639106",
"0.61616814",
"0.61616814",
"0.61413836",
"0.5984232",
"0.59159887",
"0.5897585",
"0.5852864",
"0.5852531",
"0.5845502",
"0.58358276",
"0.5820847",
"0.58184165",
"0.57782173",
"0.5... | 0.0 | -1 |
Creates new form AssemblingMessageListPanel | public AssemblingMessageListPanel()
{
//initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Panel createMessagePanel()\n {\n Panel messagePanel;\n Label product;\n Label version;\n Label copyright;\n\n product = new Label(\"File System Archiver\");\n version = new Label(\"Version \" + Constants.CLIENT_VERSION);\n copyright = new Label(\"Copyright (c) 2001\");\... | [
"0.6715033",
"0.6691811",
"0.62373495",
"0.62155616",
"0.62065184",
"0.61659354",
"0.6161474",
"0.61232215",
"0.60843676",
"0.60825914",
"0.6055489",
"0.6039775",
"0.60235727",
"0.594168",
"0.593333",
"0.59086347",
"0.5907538",
"0.58488655",
"0.5809259",
"0.5806549",
"0.57918... | 0.7673965 | 0 |
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() {
setName("Form"); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
} | {
"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.7319037",
"0.7290621",
"0.7290621",
"0.7290621",
"0.7285163",
"0.72480375",
"0.72130316",
"0.7207723",
"0.7195822",
"0.7189463",
"0.7183591",
"0.71580946",
"0.7147075",
"0.70924276",
"0.70795405",
"0.7056352",
"0.6986753",
"0.6976759",
"0.6954958",
"0.69533294",
"0.6944831... | 0.679347 | 66 |
//GENEND:initComponents Variables declaration do not modify//GENBEGIN:variables End of variables declaration//GENEND:variables | @Override
protected void initData()
{
super.initData();
entityProps = getFormSession().getAssemblingMessageEntityProperties();
refreshDataTable(entityProps);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initComponents() {\n\t\t\n\t}",
"private void initComponents() {\n\t\t\n\t}",
"@Override\r\n public void initComponent() {\n }",
"@Override\n public void initComponent() {\n }",
"@Override\n public void initComponent() {\n }",
"private void afterInitComponents() {\n \t\t\n ... | [
"0.80431527",
"0.80431527",
"0.7521478",
"0.7510658",
"0.7510658",
"0.74980545",
"0.74699587",
"0.74584985",
"0.7080772",
"0.6987208",
"0.69318783",
"0.6907604",
"0.6859018",
"0.6850131",
"0.68321925",
"0.6826834",
"0.6815671",
"0.68034476",
"0.678147",
"0.6774307",
"0.675789... | 0.0 | -1 |
Used to reset the hash table after combining rows or doing other functions that might upset the hash function | public void resetPrimKey(){
//Gets headings and resets them
if(!validTable()){
System.out.println("Error:Table:resetPrimKey: table is invalid, primary keys not reset");
return;
}
Vector<String> tempPrimKeyHeading = new Vector<String>();
for(int i : primKeyIndexes){
tempPrimKeyHeading.add(heading.elementAt(i));
}
setPrimKey(tempPrimKeyHeading);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void rehash(){\n\t\tHashTable that = new HashTable(2 * this.table.length);\n\t\tfor (int i = 0; i < this.table.length; i++){\n\t\t\tif (this.table[i] != null){\n\t\t\t\tthat.addRecord(this.table[i].getValue());\n\t\t\t}\n\t\t}\n\t\tthis.table = that.table;\n\t\treturn;\n\t}",
"private void rehash() {\n ... | [
"0.8149512",
"0.7792811",
"0.77700436",
"0.77087295",
"0.77071637",
"0.7694967",
"0.76866496",
"0.7683343",
"0.74940264",
"0.74431884",
"0.73770386",
"0.7325766",
"0.7312031",
"0.708677",
"0.6893225",
"0.6880543",
"0.68597263",
"0.6828151",
"0.67853206",
"0.6742439",
"0.67250... | 0.60202193 | 41 |
Takes passed vector and sets those headings as the primary key columns | public void setPrimKey(Vector<String> _primKeyHeadings) {
if(_primKeyHeadings.isEmpty()) {
System.out.println("Error:Table:setPrimKey:empty vector passed, failed to set");
return;
}
//Changes headings
primKeyHeadings = _primKeyHeadings;
Vector<Integer> tempPrimKeyIndexes = new Vector<Integer>();
for(String s : primKeyHeadings) {
for(int i = 0; i < heading.size(); i++) {
if(s.contentEquals(heading.elementAt(i))) {
tempPrimKeyIndexes.add(i);
i = heading.size();
}
}
}
if(tempPrimKeyIndexes.isEmpty()) {
System.out.println("Error:Table:setPrimKey:no heading matched primKeyHeading, failed to set");
return;
}
primKeyIndexes.clear();
primKeyIndexes = tempPrimKeyIndexes;
if(!rows.isEmpty()) {
Hashtable<String, Row> tempRows = new Hashtable<String, Row>();
Set<String> keys = rows.keySet();
for(String k : keys) {
String key = "";
for(int i : primKeyIndexes)
key = key + rows.get(k).getDataAtIndex(i);
tempRows.put(key, rows.get(k));
}
rows = tempRows;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ColumnNames createColumnNames();",
"protected void setColumns(String[] columns)\n\t{\n\t\t_searchKeyList = new Vector(columns.length) ;\n\t\tfor (int i = 0; i < columns.length; i++)\n\t\t{\n\t\t\t//#CM708979\n\t\t\t// Key column set\n\t\t\t_searchKeyList.addElement(new Key(columns[i])) ;\n\t\t}\n\t}",
"public ... | [
"0.614712",
"0.6079193",
"0.60522366",
"0.5827801",
"0.5746409",
"0.5714258",
"0.5682405",
"0.56778294",
"0.5620944",
"0.55800366",
"0.5578479",
"0.545767",
"0.54319936",
"0.53856003",
"0.5378561",
"0.5349979",
"0.5338539",
"0.53273576",
"0.52887",
"0.5280609",
"0.5269635",
... | 0.6358242 | 0 |
Deletes the row _deleteThis from this table | public void deleteRow(Row _deleteThis){
if(!validTable()){
System.out.println("Error:Table:deleteRow: table invalid, nothing done");
return;
}
Set<String> keys = rows.keySet();
//Searches for row to delete and then removes it
for(String k : keys) {
if(_deleteThis.getData() == rows.get(k).getData()){
rows.remove(k);
return;
}
}
System.out.println("Error:Table:deleteRow: Unable to find passed row, no row deleted");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}",
"public void deleteRow() throws SQLException\n {\n m_rs.deleteRow();\n }",
"@Override\n\tpublic boolean delete() {\n\t\tString sql=\"DELETE FROM tc_student where id=\"+id;\n\t\t//`\n\t\t\n\t\tSystem.out.println(sql);\n\t\treturn mysq... | [
"0.688631",
"0.64930296",
"0.6405151",
"0.63457364",
"0.6288255",
"0.6281675",
"0.6224895",
"0.6214091",
"0.6196479",
"0.6195321",
"0.61937743",
"0.6191537",
"0.6191274",
"0.618553",
"0.6175983",
"0.61358166",
"0.6131334",
"0.61128485",
"0.6098253",
"0.6098096",
"0.6090609",
... | 0.7691019 | 0 |
Print function for table | public void show() {
if(heading.isEmpty()) {
System.out.println("Error:Table:show:no data in heading, nothing to show");
return;
}
if(rows.isEmpty()) {
System.out.println("Error:Table:show:no data in rows, nothing to show");
return;
}
for(String h : heading) {
System.out.print(h + " | ");
}
System.out.println("");
Set<String> keys = rows.keySet();
for(String k : keys) {
rows.get(k).show();
System.out.println("");
}
System.out.println("");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void print() {\r\n this.table.printTable();\r\n }",
"public void printTable() {\n System.out.print(\"\\033[H\\033[2J\"); // Clear the text in console\n System.out.println(getCell(0, 0) + \"|\" + getCell(0, 1) + \"|\" + getCell(0, 2));\n System.out.println(\"-+-+-\");\n ... | [
"0.8076373",
"0.80470824",
"0.7963732",
"0.79531425",
"0.79448545",
"0.76922864",
"0.7642122",
"0.7640581",
"0.7525252",
"0.74711674",
"0.7430599",
"0.7425371",
"0.74118865",
"0.7386879",
"0.7326827",
"0.72668284",
"0.72628725",
"0.7234451",
"0.72275174",
"0.71849287",
"0.716... | 0.6777114 | 41 |
inserts the rows from the vector _data into the table | public void insertRow(Vector<Row> _data) {
if(!validTable()){
System.out.println("Error:Table:insertRow: table invalid, nothing done");
return;
}
//inserts a row and updates indexes
if(_data.size() == 0){
System.out.println("Error:Table:insertRow: data to be inserted is empty, no data inserted");
return;
}
if(!rows.isEmpty() && _data.elementAt(0).getData().size() != rows.get(rows.keySet().iterator().next()).getData().size()){
System.out.println("Error:Table:insertRow: data to be inserted is a mismatched size to existing data, no data inserted");
return;
}
for(Row r : _data) {
String key = "";
for(int i : primKeyIndexes)
key = key + r.getDataAtIndex(i);
rows.put(key, r);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insert(Vector _data) {\r\n //Error check\r\n if(!validTable()){\r\n System.out.println(\"Error:Table:insert: table invalid, nothing done\");\r\n return;\r\n }\r\n if(_data.size() == 0) {\r\n System.out.println(\"Error:Table:insert:data passed... | [
"0.7957237",
"0.682538",
"0.67438143",
"0.647228",
"0.6429839",
"0.640049",
"0.6296245",
"0.61929107",
"0.6103569",
"0.6021098",
"0.5989377",
"0.594229",
"0.5883347",
"0.58817714",
"0.5873919",
"0.58697605",
"0.5868211",
"0.585493",
"0.5853364",
"0.57698596",
"0.5688493",
"... | 0.77317184 | 1 |
inserts a row into the table with the data from the vector _data | public void insert(Vector _data) {
//Error check
if(!validTable()){
System.out.println("Error:Table:insert: table invalid, nothing done");
return;
}
if(_data.size() == 0) {
System.out.println("Error:Table:insert:data passed is empty, no data added");
return;
}
if(_data.size() != heading.size()) {
System.out.println("Error:Table:insert:mismatch of data size no data added");
return;
}
//Inserts data into new row
String key = "";
Row newRow = new Row(_data);
for(int i : primKeyIndexes)
key = key + newRow.getDataAtIndex(i);
rows.put(key, newRow);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insertRow(Vector<Row> _data) {\r\n if(!validTable()){\r\n System.out.println(\"Error:Table:insertRow: table invalid, nothing done\");\r\n return;\r\n }\r\n //inserts a row and updates indexes\r\n if(_data.size() == 0){\r\n System.out.println(... | [
"0.83356494",
"0.65675056",
"0.65602696",
"0.6423832",
"0.626995",
"0.6259061",
"0.62586594",
"0.6200319",
"0.6185722",
"0.61658084",
"0.61271256",
"0.61131144",
"0.6108649",
"0.6106758",
"0.6098463",
"0.6080464",
"0.607492",
"0.60642534",
"0.60143024",
"0.59903324",
"0.59758... | 0.81662196 | 1 |
Generic constructor with parameter | public A089347(final int last) {
mLast = last;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Generic(){\n\t\tthis(null);\n\t}",
"Constructor<T> newConstructor();",
"T newInstance(Object... args);",
"public GenericContainer(T t){\n obj = t;\n }",
"public SimpleGeneric(T param) {\n this.objRef = param;\n }",
"public abstract DataType<T> newInstance();",
"public T newInstance... | [
"0.7248368",
"0.689845",
"0.67463917",
"0.66964704",
"0.64533365",
"0.64496225",
"0.6419781",
"0.6396002",
"0.63688135",
"0.631674",
"0.631674",
"0.63021505",
"0.62525254",
"0.62509733",
"0.62271535",
"0.6190857",
"0.61657065",
"0.61191225",
"0.6116513",
"0.6110504",
"0.61008... | 0.0 | -1 |
Parameters: Regardless of the GUI parameter, GUI will be run cca (Optional): Address in the form of an IP address or another form ccp (Optional): Port to be connected to | public static void main(String[] args) throws InterruptedException {
Constants.updateConstants(args, Constants.NodeType.ChatClient);
GeneralUtils.promptUserOptions(args, Constants.NodeType.ChatClient, "-cca", "-ccp", "-user", "-name");
ClientNetwork client = ClientUtils.initNetwork();
Data db = new Data();
MainChatWindowController clientInterface = ClientUtils.setupClientGUI(args);
clientInterface.setOnClose(event -> {
if(!client.isNetworkClosed() && !client.isConnectionLost()) {
client.logOff();
}
client.setNetworkClosed(true);
});
ClientUtils.initInterface(clientInterface, client, db);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args){\n\t\tClientGui gui = new ClientGui();\n\t\tString address = args[0];\n\t\tgui.address=address;\n\t\tint port = Integer.parseInt(args[1]);\n\t\tgui.port = port;\n\t\t//unable to connect?\n\t\treturn ; \n\n\t}",
"public static void main(String[] args){\n String data =... | [
"0.64993256",
"0.6228979",
"0.6039551",
"0.5953749",
"0.58411056",
"0.5809904",
"0.5807841",
"0.57854635",
"0.5746336",
"0.57347775",
"0.5688993",
"0.5644658",
"0.5617763",
"0.56075656",
"0.5605714",
"0.56020397",
"0.5577522",
"0.55716735",
"0.5567713",
"0.55585504",
"0.55431... | 0.5256297 | 59 |
Creates the given view in the database | public void createView(View view) throws SQLException {
SQLCommand.runMetaDataCommand(m_connection, I18N.getLocalizedMessage("Create View"), getCreateSQL(view));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void processCreateView() throws HsqlException {\n\n String name = tokenizer.getName();\n HsqlName schemaname =\n session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst());\n int logposition = tokenizer.getPartMarker();\n\n database.schemaManager.checkUserViewNot... | [
"0.75790805",
"0.7326374",
"0.689735",
"0.68855196",
"0.68781203",
"0.68209195",
"0.6816605",
"0.6758537",
"0.664094",
"0.6436211",
"0.6265204",
"0.61770093",
"0.61149055",
"0.60276824",
"0.5930245",
"0.58703154",
"0.58678955",
"0.5841881",
"0.5800184",
"0.573876",
"0.5688681... | 0.80414164 | 0 |
Drops the view from the database | public void dropView(DbObjectId objectId, boolean cascade) throws SQLException {
SQLCommand.runMetaDataCommand(m_connection, I18N.getLocalizedMessage("Drop View"),
getDropSQL(objectId, cascade));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void dropView(SchemaTableName viewName)\n {\n metaManager.deleteViewMetadata(viewName);\n }",
"public void testDropView()\n throws Exception\n {\n String sql = \"create schema s8\";\n stmt.execute(sql);\n\n sql = \"create view s8.v as select * from (values(0))\"... | [
"0.7170404",
"0.716612",
"0.6699636",
"0.65044063",
"0.63276947",
"0.6316615",
"0.6309919",
"0.6302683",
"0.6291047",
"0.62807655",
"0.6214391",
"0.6143111",
"0.61177504",
"0.6106697",
"0.6102525",
"0.6076875",
"0.60282487",
"0.6006739",
"0.59530103",
"0.59265536",
"0.5924699... | 0.63442624 | 4 |
Creates the given view in the database | public String getCreateSQL(View view) {
StringBuffer sql = new StringBuffer();
sql.append("CREATE VIEW ");
sql.append(view.getFullyQualifiedName());
sql.append(" AS ");
sql.append(view.getDefinition());
return sql.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createView(View view) throws SQLException {\n\t\tSQLCommand.runMetaDataCommand(m_connection, I18N.getLocalizedMessage(\"Create View\"), getCreateSQL(view));\n\t}",
"private void processCreateView() throws HsqlException {\n\n String name = tokenizer.getName();\n HsqlName schemaname =\n ... | [
"0.80414164",
"0.75790805",
"0.7326374",
"0.689735",
"0.68781203",
"0.68209195",
"0.6816605",
"0.6758537",
"0.664094",
"0.6436211",
"0.6265204",
"0.61770093",
"0.61149055",
"0.60276824",
"0.5930245",
"0.58703154",
"0.58678955",
"0.5841881",
"0.5800184",
"0.573876",
"0.5688681... | 0.68855196 | 4 |
Drops the view from the database | public String getDropSQL(DbObjectId objectId, boolean cascade) {
StringBuffer sql = new StringBuffer();
sql.append("DROP VIEW ");
sql.append(objectId.getFullyQualifiedName());
if (m_connection.supportsSchemas()) {
if (cascade)
sql.append(" CASCADE");
}
sql.append(';');
return sql.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void dropView(SchemaTableName viewName)\n {\n metaManager.deleteViewMetadata(viewName);\n }",
"public void testDropView()\n throws Exception\n {\n String sql = \"create schema s8\";\n stmt.execute(sql);\n\n sql = \"create view s8.v as select * from (values(0))\"... | [
"0.7170404",
"0.716612",
"0.6699636",
"0.65044063",
"0.63442624",
"0.63276947",
"0.6316615",
"0.6309919",
"0.6302683",
"0.6291047",
"0.62807655",
"0.6214391",
"0.6143111",
"0.61177504",
"0.6106697",
"0.6102525",
"0.6076875",
"0.60282487",
"0.6006739",
"0.59530103",
"0.5926553... | 0.5498342 | 72 |
Modifies the given view in the database. | public void modifyView(View newView, View oldView) throws SQLException {
// if ( m_connection.supportsSchemas() )
// {
// StringBuffer sql = new StringBuffer();
// sql.append( "CREATE OR REPLACE VIEW " );
// sql.append( oldView.getSchemaQualifiedViewName() );
// / sql.append( " AS " );
// sql.append( newView.getDefinition() );
// SQLCommand.runMetaDataCommand( m_connection,
// I18N.getLocalizedMessage("Modify View"), sql.toString() );
// }
// else
// {
String sql1 = getDropSQL(oldView.getTableId(), false);
String sql2 = getCreateSQL(newView);
SQLCommand.runMetaDataCommand(m_connection, I18N.getLocalizedMessage("Modify View"), sql1, sql2);
// }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void updateView() throws Exception{\n Connection conn = null;\n PreparedStatement pr = null;\n ResultSet rs = null;\n try {\n String query = \"Update [view] set viewed = viewed + 1\";\n conn = getConnection();\n pr = conn.prepareSta... | [
"0.7198274",
"0.68865514",
"0.67145205",
"0.6474923",
"0.64128095",
"0.63444215",
"0.62127763",
"0.61855763",
"0.61855763",
"0.6110115",
"0.58857816",
"0.58520937",
"0.58002347",
"0.5776939",
"0.57656056",
"0.5710572",
"0.57007855",
"0.56815445",
"0.5665289",
"0.56652766",
"0... | 0.65468013 | 3 |
TODO Autogenerated method stub | public static void main(String[] args) throws SQLException {
ConnectionDB.Connect();
ClientImplement ci = new ClientImplement();
//Client c = new Client();
System.out.println(ci.consulterClient(3));
//System.out.println(ci.consulterClient(3).get)
} | {
"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 |
++ getter for static property _CLASS Getter for property _CLASS. Property with autogenerated accessor that returns the Class object for a given component. | public static Class get_CLASS()
{
return AdvancingIterator.class;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCls() {\n\t\tif (null != this.cls) {\n\t\t\treturn this.cls;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"cls\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Coding classValue() {... | [
"0.6819101",
"0.637188",
"0.6322224",
"0.6285866",
"0.62342185",
"0.6214333",
"0.6201546",
"0.61792296",
"0.6177659",
"0.6120786",
"0.6092721",
"0.6042846",
"0.6040999",
"0.5998922",
"0.5998922",
"0.5982912",
"0.5982912",
"0.59537566",
"0.59344745",
"0.59286845",
"0.59222686"... | 0.0 | -1 |
++ getter for autogen property _Module This is an autogenerated method that returns the global [design time] parent component. Note: the class generator will ignore any custom implementation for this behavior. | private com.tangosol.coherence.Component get_Module()
{
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }",
"private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }",
"private c... | [
"0.84653527",
"0.84653527",
"0.84653527",
"0.84653527",
"0.838781",
"0.838781",
"0.838781",
"0.838781",
"0.838781",
"0.838781",
"0.6677844",
"0.66413707",
"0.65845513",
"0.6581047",
"0.6401492",
"0.6372741",
"0.6347728",
"0.63443476",
"0.63425547",
"0.6324102",
"0.6320454",
... | 0.7360135 | 12 |
Accessor for the property "NextElement" Getter for property NextElement. Next entry to return. | private Object getNextElement()
{
return __m_NextElement;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Element<T> getNextElement() \n\t{\n\t\treturn nextElement;\n\t}",
"public ListElement getNext()\n\t {\n\t return this.next;\n\t }",
"public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}",
"public T getNextElement();",
"@com.francetelecom.rd.stubs.annotation.FieldGet(\"e\")\n\t\tp... | [
"0.80018556",
"0.7763449",
"0.77483845",
"0.7622492",
"0.7527764",
"0.7442964",
"0.7387434",
"0.73717695",
"0.7370216",
"0.733078",
"0.72981054",
"0.7230698",
"0.7215802",
"0.71753037",
"0.71470827",
"0.70632595",
"0.70622855",
"0.70225096",
"0.699936",
"0.69972205",
"0.69938... | 0.8322336 | 0 |
Accessor for the property "NextReady" Getter for property NextReady. True iff the NextEntry is ready. | private boolean isNextReady()
{
return __m_NextReady;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean getReady() {\r\n\t\treturn ready;\r\n\t}",
"private void setNextReady(boolean fReady)\n {\n __m_NextReady = fReady;\n }",
"public boolean isReady()\r\n {\r\n return _isReady;\r\n }",
"public boolean isReady() {\n return ready;\n }",
"public boolean... | [
"0.67259127",
"0.64423555",
"0.63025975",
"0.6280419",
"0.6279612",
"0.62632805",
"0.6248923",
"0.6175715",
"0.6166297",
"0.6163551",
"0.61538863",
"0.6146296",
"0.61441416",
"0.61330414",
"0.6071159",
"0.60511756",
"0.6047531",
"0.59736294",
"0.5966212",
"0.5962812",
"0.5947... | 0.7844772 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.