buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public boolean addLink(java.lang.String dbid, com.facebook.LinkBench.Link a, boolean noinverse) throws java.lang.Exception {
int creationCount;
try (edu.berkeley.cs.Transaction tx = session.beginTransaction()) {
java.lang.String createLinkStmt = "MATCH (n1 {id: {id1}}) MATCH (n2: {id: {id2}}) " + "CREAT... | public boolean addLink(java.lang.String dbid, com.facebook.LinkBench.Link a, boolean noinverse) throws java.lang.Exception {
int creationCount;
try (edu.berkeley.cs.Transaction tx = session.beginTransaction()) {
java.lang.String createLinkStmt = "MATCH (n1 {id: {id1}}) MATCH (n2: {id: {id2}}) " + "CREAT... |
protected void runContinuously() {
wait.until(() -> (Robot.oi.drive.buttons.RB()) || (Robot.oi.drive.buttons.LB()));
if (Robot.oi.drive.buttons.RB()) {
Robot.servos.gearDropArm.setAngle(Robot.GEAR_DROPPER_OUT);
}else
if (Robot.oi.drive.buttons.LB()) {
Robot.servos.gearDropArm.set... | protected void runContinuously() {
wait.until(() -> (Robot.oi.drive.buttons.LB()) || (Robot.oi.drive.buttons.RB()));
if (Robot.oi.drive.buttons.RB()) {
Robot.servos.gearDropArm.setAngle(Robot.GEAR_DROPPER_OUT);
}else
if (Robot.oi.drive.buttons.LB()) {
Robot.servos.gearDropArm.set... |
private static void populateJavaPropertyVariables() {
if (org.apache.flink.test.util.SecureTestEnvironment.LOG.isDebugEnabled()) {
java.lang.System.setProperty("sun.security.krb5.debug", "true");
}
java.lang.System.setProperty("java.security.krb5.conf", org.apache.flink.test.util.SecureTestEnvironme... | private static void populateJavaPropertyVariables() {
if (org.apache.flink.test.util.SecureTestEnvironment.LOG.isDebugEnabled()) {
java.lang.System.setProperty("sun.security.krb5.debug", "true");
}
java.lang.System.setProperty("java.security.krb5.conf", org.apache.flink.test.util.SecureTestEnvironme... |
private boolean isToReview(com.eclipsesource.json.JsonValue v) {
final com.eclipsesource.json.JsonArray items = v.asObject().get("items").asArray();
for (final com.eclipsesource.json.JsonValue item : items) {
final com.eclipsesource.json.JsonObject io = item.asObject();
if ((io.get("field").asSt... | private boolean isToReview(com.eclipsesource.json.JsonValue v) {
final com.eclipsesource.json.JsonArray items = v.asObject().get("items").asArray();
for (final com.eclipsesource.json.JsonValue item : items) {
final com.eclipsesource.json.JsonObject io = item.asObject();
if ((io.get("field").asSt... |
public org.nschmidt.csgn.Triangle clone() {
java.util.List<org.nschmidt.csgn.Vector3d> newVertices = new java.util.ArrayList<org.nschmidt.csgn.Vector3d>(vertices.size());
for (org.nschmidt.csgn.Vector3d vertex : vertices) {
newVertices.add(vertex.clone());
}
return new org.nschmidt.csgn.Triangle... | public org.nschmidt.csgn.Triangle clone() {
return new org.nschmidt.csgn.Triangle(df, this.vertices[0].clone(), this.vertices[1].clone(), this.vertices[2].clone(), new org.nschmidt.ldparteditor.data.GColourIndex(colour.getColour(), colour.getIndex()));
} |
private static boolean[] stringToInstrBitArray(java.lang.String s, char magicChar) {
boolean[] arr = new boolean[ch.hszt.kfh.compost.Compost.INSTR_SIZE];
for (int i = 0; i < (arr.length); i++) {
arr[i] = (s.charAt(i)) == magicChar;
}
return arr;
} | private static boolean[] stringToInstrBitArray(java.lang.String s, char magicChar, boolean not) {
boolean[] arr = new boolean[ch.hszt.kfh.compost.Compost.INSTR_SIZE];
for (int i = 0; i < (arr.length); i++) {
arr[i] = (s.charAt(i)) == magicChar;
if (not) {
arr[i] = !(arr[i]);
... |
public void terminate() throws java.lang.Exception {
try {
lock.writeLock().lock();
for (com.infiniteautomation.mango.io.serial.SerialPortIdentifier id : ownedPorts) {
try {
id.getPort().close();
} catch (java.lang.Exception e) {
LOG.error(e.ge... | public void terminate() throws java.lang.Exception {
try {
lock.writeLock().lock();
for (com.infiniteautomation.mango.io.serial.SerialPortIdentifier id : ownedPorts) {
try {
id.getPort().close();
} catch (java.lang.Exception e) {
LOG.error(e.ge... |
private void resetBlocks() {
for (int changeToOrig = 0; changeToOrig < (plateXZsTotal); changeToOrig += 2) {
origBlocks.get(changeToOrig).setType(origMats.get(changeToOrig));
origBlocks.get((changeToOrig + 1)).setType(origMats.get((changeToOrig + 1)));
}
} | private void resetBlocks() {
if ((origBlocks.get(0)) != null)
for (int changeToOrig = 0; changeToOrig < (plateXZsTotal); changeToOrig += 2) {
origBlocks.get(changeToOrig).setType(origMats.get(changeToOrig));
origBlocks.get((changeToOrig + 1)).setType(origMats.get((changeToOrig + 1)))... |
public void update() {
uk.me.webpigeon.util.Vector2D targetForce = behavour.process();
x += targetForce.getX();
y += targetForce.getY();
location.add(targetForce);
velocity = uk.me.webpigeon.util.Vector2D.add(targetForce, velocity, uk.me.webpigeon.world.SteeringEntity.VECTOR_SMOOTHING);
previous... | public void update() {
uk.me.webpigeon.util.Vector2D targetForce = behavour.process();
x += targetForce.getX();
y += targetForce.getY();
velocity = uk.me.webpigeon.util.Vector2D.add(targetForce, velocity, uk.me.webpigeon.world.SteeringEntity.VECTOR_SMOOTHING);
location.add(velocity);
previousLoc... |
public <T> java.util.List<T> loadAll(java.lang.Class<T> type) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException {
com.phlox.asql.ClassInfo classInfo = models.getClassInfo(type);
java.lang.String query = "SELECT... | public <T> java.util.List<T> loadAll(java.lang.Class<T> type) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException {
com.phlox.asql.ClassInfo classInfo = models.getClassInfo(type);
java.lang.String query = "SELECT... |
public void onInventoryItemMove(org.bukkit.event.inventory.InventoryMoveItemEvent event) {
org.bukkit.inventory.Inventory src = event.getSource();
org.bukkit.inventory.Inventory dest = event.getDestination();
org.bukkit.inventory.Inventory me = event.getInitiator();
if (passThrough(src, dest, me)) {
... | public void onInventoryItemMove(org.bukkit.event.inventory.InventoryMoveItemEvent event) {
org.bukkit.inventory.Inventory src = event.getSource();
org.bukkit.inventory.Inventory dest = event.getDestination();
org.bukkit.inventory.Inventory me = event.getInitiator();
if (passThrough(src, dest, me)) {
... |
public java.lang.String createStudentTable() {
return ((((((((((("CREATE TABLE IF NOT EXISTS " + (STUDENT)) + " (") + (STD_ID)) + " INTEGER PRIMARY KEY AUTOINCREMENT, ") + (STUDENT_NUM)) + " TEXT NOT NULL UNIQUE, ") + (FNAME)) + " TEXT NOT NULL, ") + (LNAME)) + " TEXT NOT NULL, ") + (PASSWORD)) + " TEXT NOT NULL);"... | public java.lang.String createStudentTable() {
return ((((((((((("CREATE TABLE IF NOT EXISTS " + (STUDENT)) + " (") + (STD_ID)) + " INTEGER PRIMARY KEY AUTOINCREMENT, ") + (STUDENT_NUM)) + " TEXT NOT NULL, ") + (FNAME)) + " TEXT NOT NULL, ") + (LNAME)) + " TEXT NOT NULL, ") + (PASSWORD)) + " TEXT NOT NULL);";
} |
private void removeFromListActionPerformed(java.awt.event.ActionEvent evt) {
int[] itemsSelected = numbersToBeAddedList.getSelectedIndices();
for (int i = (itemsSelected.length) - 1; i >= 0; i--) {
java.lang.String[] temp = listModel.getElementAt(0).toString().split(" -> ");
ownMap.remove(temp[0... | private void removeFromListActionPerformed(java.awt.event.ActionEvent evt) {
int[] itemsSelected = numbersToBeAddedList.getSelectedIndices();
for (int i = (itemsSelected.length) - 1; i >= 0; i--) {
java.lang.String[] temp = listModel.getElementAt(i).toString().split(" -> ");
ownMap.remove(temp[0... |
public boolean onTouch(android.view.View v, android.view.MotionEvent event) {
v.onTouchEvent(event);
if ((event.getAction()) == (android.view.MotionEvent.ACTION_UP)) {
if (testResultHolder.longPressed) {
testResultHolder.longPressed = false;
mAdapterCallback.restart((position - 1... | public boolean onTouch(android.view.View v, android.view.MotionEvent event) {
if ((event.getAction()) == (android.view.MotionEvent.ACTION_UP)) {
if (testResultHolder.longPressed) {
testResultHolder.longPressed = false;
mAdapterCallback.restart((position - 1));
}
}
ret... |
public java.util.ArrayList<org.powertac.du.CustomerInfo> getAvailableContractCustomers() {
java.util.ArrayList<org.powertac.du.CustomerInfo> availableContractCustomers = new java.util.ArrayList<org.powertac.du.CustomerInfo>();
org.powertac.du.DefaultBrokerService.log.info(("Hallooooo" + (customerRepo.list().siz... | public java.util.ArrayList<org.powertac.du.CustomerInfo> getAvailableContractCustomers() {
java.util.ArrayList<org.powertac.du.CustomerInfo> availableContractCustomers = new java.util.ArrayList<org.powertac.du.CustomerInfo>();
for (org.powertac.du.CustomerInfo ci : customerRepo.list()) {
if ((ci != null... |
public void addItem(payments.stone.com.br.desafiomobile.model.Product product, int quantity) {
for (payments.stone.com.br.desafiomobile.model.CartItem item : items) {
if (item.getProduct().equals(product)) {
item.setCount(quantity);
return ;
}
}
totalAmount = 0;
i... | public void addItem(payments.stone.com.br.desafiomobile.model.Product product, int quantity) {
for (payments.stone.com.br.desafiomobile.model.CartItem item : items) {
if (item.getProduct().equals(product)) {
if (quantity == 0) {
items.remove(item);
totalAmount = 0... |
public static bammerbom.ultimatecore.spongeapi.api.UPlayer getPlayer(java.lang.String n) {
for (bammerbom.ultimatecore.spongeapi.api.bammerbom.ultimatecore.spongeapi.api.UPlayer pl : bammerbom.ultimatecore.spongeapi.api.UC.uplayers) {
if (pl.name.equals(n)) {
return pl;
}
}
bamme... | public static bammerbom.ultimatecore.spongeapi.api.UPlayer getPlayer(java.lang.String n) {
for (bammerbom.ultimatecore.spongeapi.api.bammerbom.ultimatecore.spongeapi.api.UPlayer pl : bammerbom.ultimatecore.spongeapi.api.UC.uplayers) {
if ((pl.name) == null) {
continue;
}
if (pl.n... |
protected final void run(int direction) {
if (!(assignment4.Critter.timeStep)) {
moveSteps(2, direction);
}else {
int x = x_coord;
int y = y_coord;
moveSteps(2, direction);
if (checkCollision(x_coord, y_coord)) {
x_coord = x;
y_coord = y;
}... | protected final void run(int direction) {
if (!(assignment4.Critter.timeStep)) {
moveSteps(2, direction);
}else {
int x = x_coord;
int y = y_coord;
moveSteps(2, direction);
if (!(checkCollision(x_coord, y_coord))) {
x_coord = x;
y_coord = y;
... |
private Node getNextMove() {
Node n = fastestPath;
if (n == null) {
java.lang.System.out.println("no moves");
}else
if ((n.parent) == null) {
java.lang.System.out.println("Only move");
return n;
}
while ((n.parent.parent) != null) {
java.lang.... | private Node getNextMove() {
Node n = fastestPath;
if (n == null) {
java.lang.System.out.println("no moves");
}else
if ((n.parent) == null) {
java.lang.System.out.println("Only move");
return n;
}
while ((n.parent.parent) != null) {
java.lang.... |
protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse response) {
try {
java.lang.String jsonString = new java.lang.String(response.data, com.android.volley.toolbox.HttpHeaderParser.parseCharset(response.headers));
android.util.Log.d("TAG-------", jsonStrin... | protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse response) {
try {
java.lang.String jsonString = new java.lang.String(response.data, com.android.volley.toolbox.HttpHeaderParser.parseCharset(response.headers));
return com.android.volley.Response.success... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
if (id == (R.id.action_settings)) {
return true;
}
if (id == (R.id.remove_friend)) {
interfacer.removeFriend(friend.getUid());
return true;
}
return super.onOptionsItemSelected(i... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
if (id == (R.id.action_settings)) {
return true;
}
if (id == (R.id.remove_friend)) {
interfacer.removeFriend(friend, this);
return true;
}
return super.onOptionsItemSelected(item... |
private static java.util.ArrayList<java.util.List<model.course.LessonGroup>> initMainArr(java.util.List<model.course.Course> lcourse) {
java.util.ArrayList<java.util.List<model.course.LessonGroup>> $ = new java.util.ArrayList<>();
for (model.course.Course ¢ : lcourse) {
$.add(¢.getLectures());
$... | private static java.util.ArrayList<java.util.List<model.course.LessonGroup>> initMainArr(java.util.List<model.course.Course> lcourse) {
java.util.ArrayList<java.util.List<model.course.LessonGroup>> $ = new java.util.ArrayList<>();
for (model.course.Course ¢ : lcourse) {
if (!(¢.getLectures().isEmpty()))... |
private sadl.input.TimedInput sample(int numSeq, sadl.constants.ClassLabel label, sadl.models.pdrta.PDRTA... a) {
final java.util.List<sadl.input.TimedWord> seqs = new java.util.ArrayList<>(numSeq);
int roundRobin = 0;
for (int i = 0; i < numSeq; i++) {
seqs.add(sampleSeq(a[roundRobin], label));
... | private sadl.input.TimedInput sample(int numSeq, sadl.constants.ClassLabel label, sadl.models.pdrta.PDRTA... a) {
final java.util.List<sadl.input.TimedWord> seqs = new java.util.ArrayList<>(numSeq);
int roundRobin = 0;
for (int i = 0; i < numSeq; i++) {
seqs.add(sampleSeq(a[roundRobin], label));
... |
private java.io.File createPho(java.lang.String Target) throws java.io.FileNotFoundException {
java.io.File pho = new java.io.File(Target.replace(".wav", ".pho"));
if (pho.exists()) {
pho.delete();
}
java.io.PrintWriter out = new java.io.PrintWriter(pho);
for (tts.core.phonemes.types.Word wo... | private java.io.File createPho(java.lang.String Target) throws java.io.FileNotFoundException {
java.io.File pho = new java.io.File(Target);
if (pho.exists()) {
pho.delete();
}
java.io.PrintWriter out = new java.io.PrintWriter(pho);
for (tts.core.phonemes.types.Word word : words) {
fo... |
private java.lang.String getProcessId(java.lang.String title) throws java.lang.ClassNotFoundException, java.sql.SQLException {
java.lang.String retString = null;
java.lang.String sqlstring = ("SELECT ProzesseID FROM prozesse WHERE Titel='" + title) + "'";
java.sql.ResultSet rs = this.stmt.executeQuery(sqlst... | private java.lang.String getProcessId(java.lang.String title) throws java.lang.ClassNotFoundException, java.sql.SQLException {
java.lang.String retString = null;
java.lang.String sqlstring = ("SELECT ProzesseID FROM prozesse WHERE Titel='" + title) + "'";
try (java.sql.ResultSet rs = this.stmt.executeQuery(... |
public boolean ValidateDetails(java.lang.String name, java.lang.String username, java.lang.String password, java.lang.String confirmPassword, java.sql.Date dob) {
if (((((name != "") || (username != "")) || (password != "")) || (confirmPassword != "")) || (validateDate(dob))) {
return true;
}
return... | public boolean ValidateDetails(java.lang.String name, java.lang.String username, java.lang.String password, java.lang.String confirmPassword, java.util.Date dob) {
if (((((name != "") && (username != "")) && (password != "")) && (confirmPassword != "")) && (validateDate(dob))) {
return true;
}
retur... |
public void onValueChange(android.widget.NumberPicker picker, int oldVal, int newVal) {
int myVoteValue = myVote.getValue();
int maxVoteValue = maxVote.getValue();
infoView.setText((((myVoteValue + " von ") + maxVoteValue) + " Votierungen"));
infoView.setTextColor((myVoteValue < maxVoteValue ? android.g... | public void onValueChange(android.widget.NumberPicker picker, int oldVal, int newVal) {
int myVoteValue = myVote.getValue();
int maxVoteValue = maxVote.getValue();
infoView.setText((((myVoteValue + " von ") + maxVoteValue) + " Votierungen"));
infoView.setTextColor((myVoteValue <= maxVoteValue ? android.... |
private int getNetworkId(android.net.wifi.WifiManager wifiManager, java.lang.String SSID) {
java.util.List<android.net.wifi.WifiConfiguration> list = wifiManager.getConfiguredNetworks();
for (android.net.wifi.WifiConfiguration i : list) {
if (((i.SSID) != null) && (i.SSID.equals((("\"" + SSID) + "\"")))... | private int getNetworkId(android.net.wifi.WifiManager wifiManager, java.lang.String SSID) {
java.util.List<android.net.wifi.WifiConfiguration> list = wifiManager.getConfiguredNetworks();
if ((list == null) || ((list.size()) == 0))
return -1;
for (android.net.wifi.WifiConfiguration i : list) {
... |
public void threadError(com.mayhub.utils.download.DownloadTask downloadTask1, java.lang.String threadName) {
synchronized(lock) {
downloadingTasks.remove(downloadTask1);
THREAD_INSTANCE_CONTAINER.remove(threadName);
if ((downloadTask1.getProcessTimes()) <= (downloadConf.maxRetryCount)) {
... | public void threadError(com.mayhub.utils.download.DownloadTask downloadTask1, java.lang.String threadName) {
synchronized(lock) {
downloadingTasks.remove(downloadTask1);
THREAD_INSTANCE_CONTAINER.remove(threadName);
if ((downloadTask1.getProcessTimes()) < (downloadConf.maxRetryCount)) {
... |
public java.lang.String update() {
bean.Employee2101 emp = new bean.Employee2101(number, name, mail);
java.lang.System.out.println(emp);
try {
db.update(emp);
clear();
} catch (java.lang.Exception e) {
log.createLogger().fine(((("■" + (number)) + "|") + (e.getMessage())));
}
... | public java.lang.String update() {
bean.Employee2101 emp = new bean.Employee2101(number, name, mail);
try {
db.update(emp);
clear();
} catch (java.lang.Exception e) {
log.fine(((("■" + (number)) + "|") + (e.getMessage())));
}
return null;
} |
public void onLoadFinished(android.support.v4.content.Loader<android.database.Cursor> loader, android.database.Cursor data) {
if ((mAdapter) != null) {
mAdapter.clear();
}
android.util.Log.i(eu.nikolay_angelov.popularmovies.MovieListActivity.TAG, "onLoadFinished");
mAdapter.clear();
mAdapter... | public void onLoadFinished(android.support.v4.content.Loader<android.database.Cursor> loader, android.database.Cursor data) {
if ((mAdapter) != null) {
mAdapter.clear();
mAdapter.clear();
mAdapter.notifyDataSetChanged();
mAdapter.update(data);
mAdapter.notifyDataSetChanged();... |
private java.util.List<java.lang.String> httpRequest(java.lang.String url) {
try {
java.net.HttpURLConnection httpc = ((java.net.HttpURLConnection) (new java.net.URL(url).openConnection()));
try (java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(httpc.getInputStrea... | private java.util.List<java.lang.String> httpRequest(java.lang.String url) throws java.io.IOException {
java.net.HttpURLConnection httpc = ((java.net.HttpURLConnection) (new java.net.URL(url).openConnection()));
try (java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(httpc.getI... |
public com.treestar.lib.xml.SElement getElement() {
com.treestar.lib.xml.SElement result = new com.treestar.lib.xml.SElement(getName());
if (!(parameterNames.isEmpty())) {
com.treestar.lib.xml.SElement elem = new com.treestar.lib.xml.SElement("Parameters");
result.addContent(elem);
for (... | public com.treestar.lib.xml.SElement getElement() {
com.treestar.lib.xml.SElement result = new com.treestar.lib.xml.SElement(getName());
if (!(parameterNames.isEmpty())) {
com.treestar.lib.xml.SElement elem = new com.treestar.lib.xml.SElement("Parameters");
result.addContent(elem);
for (... |
private static void copy(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws java.lang.Exception {
byte[] buffer = new byte[8192];
int length;
while ((length = inputStream.read(buffer)) != (-1)) {
outputStream.write(buffer, 0, length);
}
outputStream.close();
} | private static void copy(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws java.lang.Exception {
byte[] buffer = new byte[8192];
int length;
while ((length = inputStream.read(buffer)) != (-1)) {
outputStream.write(buffer, 0, length);
}
outputStream.close();
inpu... |
public static void main(java.lang.String[] args) throws java.io.IOException {
GUI.accounts = new java.util.ArrayList<Account>();
GUI.trans = new java.util.ArrayList<Transaction>();
IO.initAccount(GUI.accounts);
IO.initTrans(GUI.trans);
if (!(GUI.accounts.isEmpty())) {
GUI.currAccount = GUI.a... | public static void main(java.lang.String[] args) throws java.io.IOException {
GUI.accounts = new java.util.ArrayList<Account>();
IO.initAccount(GUI.accounts);
if (!(GUI.accounts.isEmpty())) {
GUI.currAccount = GUI.accounts.get(0);
}
GUI.GUI();
} |
void dispose() {
if (doCleanDirty) {
java.util.Arrays.fill(curCurvepts, 0.0F);
java.util.Arrays.fill(firstSegmentsBuffer, 0.0F);
}
if ((this.recycleDashes) && ((dash) != (dashes_initial))) {
rdrCtx.putDirtyFloatArray(dash);
}
if ((firstSegmentsBuffer) != (firstSegmentsBuffer_... | void dispose() {
if (doCleanDirty) {
java.util.Arrays.fill(curCurvepts, 0.0F);
java.util.Arrays.fill(firstSegmentsBuffer, 0.0F);
}
if ((recycleDashes) && ((dash) != (dashes_initial))) {
rdrCtx.putDirtyFloatArray(dash);
}
if ((firstSegmentsBuffer) != (firstSegmentsBuffer_initi... |
public void printArr() {
for (char[] x : arr) {
for (char b : x) {
java.lang.String up = "" + b;
up = up.toUpperCase();
java.lang.System.out.print((up + " | "));
}
java.lang.System.out.println("");
}
} | public void printArr() {
for (char[] x : arr) {
for (char b : x) {
java.lang.String up = "" + b;
up = up.toUpperCase();
java.lang.System.out.print((up + " | "));
}
java.lang.System.out.println("");
}
java.lang.System.out.println("");
} |
public static java.sql.ResultSet selectQuery(java.lang.String query, java.sql.Connection con) throws java.lang.ClassNotFoundException, java.sql.SQLException {
java.sql.ResultSet rs = null;
java.sql.Statement stmt;
try {
java.lang.Class.forName(music.Main.JDBC_DRIVER);
java.lang.System.out.pr... | public static java.sql.ResultSet selectQuery(java.lang.String query, java.sql.Connection con) throws java.lang.ClassNotFoundException, java.sql.SQLException {
java.sql.ResultSet rs;
java.sql.Statement stmt;
java.lang.Class.forName(music.Main.JDBC_DRIVER);
con = java.sql.DriverManager.getConnection(music... |
public static us.mn.state.dot.tms.Camera findFirst() {
us.mn.state.dot.tms.Camera cam = null;
java.lang.Integer n = null;
java.util.Iterator<us.mn.state.dot.tms.Camera> it = us.mn.state.dot.tms.CameraHelper.iterator();
while (it.hasNext()) {
us.mn.state.dot.tms.Camera c = it.next();
java... | public static us.mn.state.dot.tms.Camera findFirst() {
us.mn.state.dot.tms.Camera cam = null;
java.lang.Integer n = null;
java.util.Iterator<us.mn.state.dot.tms.Camera> it = us.mn.state.dot.tms.CameraHelper.iterator();
while (it.hasNext()) {
us.mn.state.dot.tms.Camera c = it.next();
java... |
public void mipsTranslate(AST.SymbolTable table, java.lang.String fileName, AST.CodeGenarator genarator) {
COUNTERS.TEMP varTemp = var.calcAddress(table, genarator, fileName);
COUNTERS.TEMP expTemp = exp.calcAddress(table, genarator, fileName);
AST.CodeGenarator.printSWCommand(expTemp.name, varTemp.name, 0)... | public void mipsTranslate(AST.SymbolTable table, java.lang.String fileName, AST.CodeGenarator genarator) {
COUNTERS.TEMP expTemp = exp.calcAddress(table, genarator, fileName);
COUNTERS.TEMP varTemp = var.calcAddress(table, genarator, fileName);
AST.CodeGenarator.printSWCommand(expTemp.name, varTemp.name, 0)... |
public void toggleBrightness() {
if ((android.os.Build.VERSION.SDK_INT) >= (android.os.Build.VERSION_CODES.M)) {
if (com.zoromatic.widgets.WidgetUpdateService.isMarshmallowSixPointZiro()) {
if (Settings.System.canWrite(this)) {
realToggleBrightness();
}else {
... | public void toggleBrightness() {
if ((android.os.Build.VERSION.SDK_INT) >= (android.os.Build.VERSION_CODES.M)) {
if (Settings.System.canWrite(this)) {
realToggleBrightness();
}else {
android.content.Intent writeSettingsIntent = new android.content.Intent(this, com.zoromatic.w... |
public void bubbleSort() {
int out;
int in;
for (out = 0; out < ((nElems) - 1); out++) {
for (in = out + 1; in < (nElems); in++) {
if ((a[out]) > (a[in]))
swap(a[out], a[in]);
}
}
} | public void bubbleSort() {
int out;
int in;
for (out = 0; out < ((nElems) - 1); out++) {
for (in = out + 1; in < (nElems); in++) {
if ((a[out]) > (a[in]))
swap(out, in);
}
}
} |
private java.util.Optional<org.mef.nrp.impl.ActivationTransaction> prepareTransaction(org.opendaylight.yang.gen.v1.uri.onf.coremodel.corenetworkmodule.objectclasses.rev160413.GForwardingConstruct fwdC) {
final java.util.List<org.opendaylight.yang.gen.v1.uri.onf.coremodel.corenetworkmodule.objectclasses.rev160413.g_... | private java.util.Optional<org.mef.nrp.impl.ActivationTransaction> prepareTransaction(org.opendaylight.yang.gen.v1.uri.onf.coremodel.corenetworkmodule.objectclasses.rev160413.GForwardingConstruct fwdC) {
final java.util.List<org.opendaylight.yang.gen.v1.uri.onf.coremodel.corenetworkmodule.objectclasses.rev160413.g_... |
public void run() {
jmri.jmrix.lenz.liusbethernet.jmri.jmrix.lenz.XNetSystemConnectionMemo m = this.getSystemConnectionMemo();
jmri.jmrix.lenz.XNetTrafficController t = m.getXNetTrafficController();
jmri.jmrix.lenz.liusbethernet.jmri.jmrix.lenz.XNetProgrammer p = ((jmri.jmrix.lenz.liusbethernet.jmri.jmrix.l... | public void run() {
jmri.jmrix.lenz.liusbethernet.jmri.jmrix.lenz.XNetSystemConnectionMemo m = this.getSystemConnectionMemo();
jmri.jmrix.lenz.XNetTrafficController t = m.getXNetTrafficController();
jmri.jmrix.lenz.liusbethernet.jmri.jmrix.lenz.XNetProgrammer p = ((jmri.jmrix.lenz.liusbethernet.jmri.jmrix.l... |
public void canCreateCallback(boolean canCreate) {
if (canCreate) {
newPartyController.create(this, partyName.getText().toString());
android.content.Intent partyAdminIntent = new android.content.Intent(this, com.myousic.activities.ActivityPartyAdmin.class);
startActivity(partyAdminIntent);
... | public void canCreateCallback(boolean canCreate) {
if (canCreate) {
newPartyController.create(this, partyName.getText().toString().toLowerCase());
android.content.Intent partyAdminIntent = new android.content.Intent(this, com.myousic.activities.ActivityPartyAdmin.class);
startActivity(partyA... |
private org.pathirage.thulitha.StorageVolume getStorageVolumeWithMaxRemainingCapacity() {
java.util.Collections.sort(storageVolumes);
org.pathirage.thulitha.StorageVolume maxSv = storageVolumes.get(((storageVolumes.size()) - 1));
if ((storageVolumes.size()) < (maxStorageVolumes)) {
return new org.pa... | public org.pathirage.thulitha.StorageVolume getStorageVolumeWithMaxRemainingCapacity() {
java.util.Collections.sort(storageVolumes);
org.pathirage.thulitha.StorageVolume maxSv = storageVolumes.get(((storageVolumes.size()) - 1));
if ((storageVolumes.size()) < (maxStorageVolumes)) {
return new org.pat... |
protected com.example.myweatherapp.DataModel doInBackground(java.lang.String... params) {
com.example.myweatherapp.DataModel dataModel = new com.example.myweatherapp.DataModel();
java.lang.String data = new com.example.myweatherapp.WeatherHttpClient().getWeatherData(params[0]);
try {
dataModel = com... | protected com.example.myweatherapp.DataModel doInBackground(java.lang.String... params) {
com.example.myweatherapp.DataModel dataModel = new com.example.myweatherapp.DataModel();
java.lang.String data = new com.example.myweatherapp.WeatherHttpClient().getWeatherData(params[0]);
try {
dataModel = com... |
int hidIndex = hid.hidIndex;
com.google.common.base.Preconditions.checkArgument((hidIndex > 0), "hidIndex (%s) must be > 0 ", hidIndex);
com.google.common.base.Preconditions.checkArgument((hidIndex < ((rgibAlloc.length) + 1)), "hidIndex (%s) out of rgiAlloc size (%s)", rgibAlloc.length);
int rgiAllocInd... | int hidIndex = hid.hidIndex;
com.google.common.base.Preconditions.checkArgument((hidIndex > 0), "hidIndex (%s) must be > 0 ", hidIndex);
com.google.common.base.Preconditions.checkArgument((hidIndex < ((rgibAlloc.length) + 1)), "hidIndex (%s) out of rgiAlloc size (%s)", hidIndex, rgibAlloc.length);
int r... |
private com.example.whatsmymood.Mood makeMood() {
if ((this.date) == null) {
mood = new com.example.whatsmymood.Mood(this.moodAuthor, this.moodType);
}else {
mood = new com.example.whatsmymood.Mood(this.moodAuthor, this.moodType, this.date);
}
mood.setMoodMsg(this.moodMsg);
mood.setL... | private com.example.whatsmymood.Mood makeMood() {
if ((this.date) == null) {
mood = new com.example.whatsmymood.Mood(this.moodAuthor, this.moodType);
}else {
mood = new com.example.whatsmymood.Mood(this.moodAuthor, this.moodType, this.date);
}
mood.setMoodMsg(this.moodMsg);
mood.setL... |
public java.util.List<team_f.domain.entities.MusicalWork> getMusicalWorks() {
javax.persistence.EntityManager session = getCurrentSession();
javax.persistence.Query query = session.createQuery("from MusicalWorkEntity");
java.util.List<team_f.database_wrapper.facade.MusicalWorkEntity> musicalWorkEntities = q... | public java.util.List<team_f.domain.entities.MusicalWork> getMusicalWorks() {
javax.persistence.EntityManager session = getCurrentSession();
javax.persistence.Query query = session.createQuery("from MusicalWorkEntity");
java.util.List<team_f.database_wrapper.facade.MusicalWorkEntity> musicalWorkEntities = q... |
public void onTick(long millisUntilFinished) {
android.animation.ObjectAnimator animation = android.animation.ObjectAnimator.ofInt(clockCounterProgressBar, "progress", clockIncrementAnimation);
animation.setDuration(1000);
animation.setInterpolator(new android.view.animation.DecelerateInterpolator());
a... | public void onTick(long millisUntilFinished) {
if (questionWasAnswered) {
mCountDownTimer.cancel();
return ;
}
android.animation.ObjectAnimator animation = android.animation.ObjectAnimator.ofInt(clockCounterProgressBar, "progress", clockIncrementAnimation);
animation.setDuration(1000);
... |
private java.util.List<com.apollographql.apollo.cache.normalized.Record> valueForObjectList(com.apollographql.apollo.cache.normalized.Record record, com.apollographql.apollo.api.ResponseField field) throws java.io.IOException {
java.util.List<com.apollographql.apollo.cache.normalized.CacheReference> values = fieldV... | private java.util.List<com.apollographql.apollo.cache.normalized.Record> valueForObjectList(com.apollographql.apollo.cache.normalized.Record record, com.apollographql.apollo.api.ResponseField field) throws java.io.IOException {
java.util.List<com.apollographql.apollo.cache.normalized.CacheReference> values = fieldV... |
protected void turnToCodePage(int newPageIndex) {
org.talend.core.views.IComponentSettingsView viewer = ((org.talend.core.views.IComponentSettingsView) (org.eclipse.ui.PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID)));
if (viewer != null) {
viewer... | protected void turnToCodePage(int newPageIndex) {
org.talend.core.views.IComponentSettingsView viewer = ((org.talend.core.views.IComponentSettingsView) (org.eclipse.ui.PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID)));
if (viewer != null) {
viewer... |
public org.usfirst.frc2832.Robot_2016.HID.GamepadState getCurrentState() {
long time = java.lang.System.currentTimeMillis();
while (((states.get(lastIndex).timestamp) - (recordedOffset)) <= (time - (startTime)))
(lastIndex)++;
(lastIndex)--;
if ((lastIndex) >= (states.size())) {
don... | public org.usfirst.frc2832.Robot_2016.HID.GamepadState getCurrentState() {
long time = java.lang.System.currentTimeMillis();
while ((lastIndex) < (states.size())) {
if (((states.get(lastIndex).timestamp) - (recordedOffset)) <= (time - (startTime)))
(lastIndex)++;
}
if ((las... |
public void loadBanner() {
if (MainActivity.packageName.equals("com.lgallardo.qbittorrentclient")) {
adView = ((com.google.android.gms.ads.AdView) (this.findViewById(R.id.adViewRssFeed)));
com.google.android.gms.ads.AdRequest adRequest = new com.google.android.gms.ads.AdRequest.Builder().build();
... | public void loadBanner() {
if (((MainActivity.packageName) == null) || (MainActivity.packageName.equals("com.lgallardo.qbittorrentclient"))) {
adView = ((com.google.android.gms.ads.AdView) (this.findViewById(R.id.adViewRssFeed)));
com.google.android.gms.ads.AdRequest adRequest = new com.google.andro... |
public void setUp() {
connector = derbyConnectorRule.getConnector();
tablesConfig = derbyConnectorRule.metadataTablesConfigSupplier().get();
connector.createAuditTable();
auditManager = new io.druid.server.audit.SQLAuditManager(connector, com.google.common.base.Suppliers.ofInstance(tablesConfig), new io... | public void setUp() {
connector = derbyConnectorRule.getConnector();
tablesConfig = derbyConnectorRule.metadataTablesConfigSupplier().get();
connector.createAuditTable();
auditManager = new io.druid.server.audit.SQLAuditManager(connector, com.google.common.base.Suppliers.ofInstance(tablesConfig), new io... |
private java.util.List<com.vip.saturn.job.console.domain.JobDiffInfo> relayDiffIfPossible(java.lang.String zkCluster) throws com.vip.saturn.job.console.exception.SaturnJobConsoleException, java.lang.InterruptedException {
try {
return relayDiff(zkCluster);
} catch (com.vip.saturn.job.console.exception.J... | private java.util.List<com.vip.saturn.job.console.domain.JobDiffInfo> relayDiffIfPossible(java.lang.String zkCluster) throws com.vip.saturn.job.console.exception.SaturnJobConsoleException, java.lang.InterruptedException {
try {
return relayDiff(zkCluster);
} catch (com.vip.saturn.job.console.exception.S... |
public boolean leq(game.math.Vector other) {
return (((x()) < (other.x())) && ((y()) < (other.y()))) && ((z()) < (other.z()));
} | public boolean leq(game.math.Vector other) {
return (((x()) <= (other.x())) && ((y()) <= (other.y()))) && ((z()) <= (other.z()));
} |
public static int intArrayToOriginValue(int[] intArr) {
int value = 0;
int pow = (intArr.length) - 1;
for (int i = 0; i < (intArr.length); i++) {
java.lang.System.out.println(intArr[i]);
value += (intArr[i]) * ((int) (java.lang.Math.pow(256, pow)));
pow--;
}
return value;
} | public static int intArrayToOriginValue(int[] intArr) {
int value = 0;
int pow = (intArr.length) - 1;
for (int i = 0; i < (intArr.length); i++) {
value += (intArr[i]) * ((int) (java.lang.Math.pow(256, pow)));
pow--;
}
return value;
} |
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
com.fishfillet.shoal.model.Car c = dataSnapshot.getValue(com.fishfillet.shoal.model.Car.class);
mTextColor.setText(c.color);
mTextYear.setText(c.year);
mTextMake.setText(c.make);
mTextModel.setText(c.model);
mText... | public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
com.fishfillet.shoal.model.Car c = dataSnapshot.getValue(com.fishfillet.shoal.model.Car.class);
if (c != null) {
mTextColor.setText(c.color);
mTextYear.setText(c.year);
mTextMake.setText(c.make);
m... |
public int update(com.lidchanin.crudindiploma.data.models.ExistingProduct existingProduct) {
android.content.ContentValues contentValues = new android.content.ContentValues();
contentValues.put(DatabaseHelper.COLUMN_ID, existingProduct.getId());
contentValues.put(DatabaseHelper.COLUMN_LIST_ID, existingProdu... | public int update(com.lidchanin.crudindiploma.data.models.ExistingProduct existingProduct) {
android.content.ContentValues contentValues = new android.content.ContentValues();
contentValues.put(DatabaseHelper.COLUMN_LIST_ID, existingProduct.getShoppingListId());
contentValues.put(DatabaseHelper.COLUMN_PRODU... |
public void shouldReturnSameChecksumOnSecondCall() throws java.io.IOException {
java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap(data);
chksumChannel.write(buffer, 0);
assertThat(chksumChannel.getChecksum(), org.hamcrest.Matchers.equalTo(expectedChecksum));
assertThat(chksumChannel.getChecksum(), o... | public void shouldReturnSameChecksumOnSecondCall() throws java.io.IOException {
java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap(data);
chksumChannel.write(buffer, 0);
assertThat(chksumChannel.getChecksum(), equalTo(expectedChecksum));
assertThat(chksumChannel.getChecksum(), equalTo(expectedChecksu... |
public void addShapeRule(java.lang.String name, javafx.scene.paint.Color color) {
if ((name == null) || (color == null))
return ;
if (allStructuresList.contains(name)) {
name = name.trim();
java.util.ArrayList<wormguides.SearchOption> optionsArray = new java.util.ArrayList<wormguide... | public void addShapeRule(java.lang.String name, javafx.scene.paint.Color color) {
if ((name == null) || (color == null))
return ;
if (allStructuresList.contains(name)) {
name = name.trim();
java.util.ArrayList<wormguides.SearchOption> optionsArray = new java.util.ArrayList<wormguide... |
private void calculateSwipeDirection() {
float xDiff = (x2) - (x1);
float yDiff = (y2) - (y1);
if ((java.lang.Math.abs(yDiff)) > (java.lang.Math.abs(xDiff))) {
if (yDiff < 0) {
direction = 0;
}else {
direction = 2;
}
}else {
if (xDiff < 0) {
... | private void calculateSwipeDirection() {
float xDiff = (x2) - (x1);
float yDiff = (y2) - (y1);
if ((java.lang.Math.abs(yDiff)) > (java.lang.Math.abs(xDiff))) {
if (yDiff < 0) {
direction = 0;
}else
if (yDiff > 0) {
direction = 2;
}
... |
public static java.util.Date parseTime(java.lang.String time) {
java.text.SimpleDateFormat[] formats = new java.text.SimpleDateFormat[]{ new java.text.SimpleDateFormat("HH:mm") , new java.text.SimpleDateFormat("hh:mm a") };
java.util.Date date = null;
for (java.text.SimpleDateFormat sdf : formats) {
... | public static java.util.Date parseTime(java.lang.String time) {
java.text.SimpleDateFormat[] formats = new java.text.SimpleDateFormat[]{ new java.text.SimpleDateFormat("hh:mm a") , new java.text.SimpleDateFormat("HH:mm") };
java.util.Date date = null;
for (java.text.SimpleDateFormat sdf : formats) {
... |
private void assertCORSHeader(org.springframework.http.HttpHeaders headers) {
java.util.Map<java.lang.String, java.lang.String> headerMap = headers.toSingleValueMap();
org.hamcrest.MatcherAssert.assertThat(headerMap, hasKey("Access-Control-Allow-Headers"));
org.hamcrest.MatcherAssert.assertThat(headerMap, h... | private void assertCORSHeader(org.springframework.http.HttpHeaders headers) {
java.util.Map<java.lang.String, java.lang.String> headerMap = headers.toSingleValueMap();
org.hamcrest.MatcherAssert.assertThat(headerMap, hasKey("Access-Control-Allow-Headers"));
org.hamcrest.MatcherAssert.assertThat(headerMap, h... |
private void syncSecurityGroup(org.opendaylight.neutron.spi.NeutronSecurityRule securityRule, org.opendaylight.neutron.spi.NeutronPort port, java.lang.String neutronSecurityGroupId, boolean write) {
if (null != (securityRule.getSecurityRemoteGroupID())) {
java.util.List<org.opendaylight.neutron.spi.Neutron_... | private void syncSecurityGroup(org.opendaylight.neutron.spi.NeutronSecurityRule securityRule, org.opendaylight.neutron.spi.NeutronPort port, boolean write) {
if (null != (securityRule.getSecurityRemoteGroupID())) {
java.util.List<org.opendaylight.neutron.spi.Neutron_IPs> vmIpList = securityServicesManager.g... |
public org.embulk.input.kafka.data.format.base.Data build() {
java.lang.String[] data = new java.lang.String(message).split(separator);
for (int idx = 0; idx < (data.length); idx++) {
set(idx, data[idx]);
}
return this;
} | public org.embulk.input.kafka.data.format.base.Data build() {
java.lang.String[] data = new java.lang.String(message).split(separator);
for (int idx = 0; idx < (data.length); idx++) {
set(data[idx]);
}
return this;
} |
public void initRBSAEOSS() {
java.lang.String path = "/Users/designassistant/Documents/workspace/design_assistant_HRC2/RBSAEOSS-Eval";
AE = rbsa.eoss.ArchitectureEvaluator.getInstance();
AG = rbsa.eoss.ArchitectureGenerator.getInstance();
rbsa.eoss.local.Params params = null;
java.lang.String search... | public void initRBSAEOSS() {
java.lang.String path = "/Users/designassistant/Documents/workspace/design_assistant_HRC2/RBSAEOSS-Eval";
AE = rbsa.eoss.ArchitectureEvaluator.getInstance();
AG = rbsa.eoss.ArchitectureGenerator.getInstance();
rbsa.eoss.local.Params params = null;
java.lang.String search... |
public java.lang.Object getManyRowsWithGetRows(com.palantir.atlasdb.performance.benchmarks.table.ConsecutiveNarrowTable.CleanNarrowTable table) {
java.util.Map<com.palantir.atlasdb.keyvalue.api.Cell, com.palantir.atlasdb.keyvalue.api.Value> result = table.getKvs().getRows(table.getTableRef(), table.getRowList(), co... | public java.lang.Object getManyRowsWithGetRows(com.palantir.atlasdb.performance.benchmarks.table.ConsecutiveNarrowTable.CleanNarrowTable table) {
java.util.Map<com.palantir.atlasdb.keyvalue.api.Cell, com.palantir.atlasdb.keyvalue.api.Value> result = table.getKvs().getRows(table.getTableRef(), table.getRowList(), co... |
public java.lang.Object processAdd(java.lang.Object[] objects) {
arr.add(((java.lang.Double) (objects[0])));
org.wso2.siddhi.debs2017.kmeans.Clusterer cluster = new org.wso2.siddhi.debs2017.kmeans.Clusterer(((java.lang.Integer) (objects[1])), 50, arr);
cluster.cluster();
java.util.ArrayList<java.lang.In... | public java.lang.Object processAdd(java.lang.Object[] objects) {
arr.add(((java.lang.Double) (objects[0])));
org.wso2.siddhi.debs2017.kmeans.Clusterer cluster = new org.wso2.siddhi.debs2017.kmeans.Clusterer(((java.lang.Integer) (objects[1])), 50, arr);
cluster.cluster();
java.util.ArrayList<java.lang.In... |
public void add(double val, int... ndKeys) {
int index = findIndex(ndKeys);
if (index >= 0) {
values.set(index, ((values.get(index)) + val));
}else {
set(val, ndKeys);
}
} | public void add(double val, int... keys) throws java.lang.Exception {
int index = findIndex(keys);
if (index >= 0) {
values.set(index, ((values.get(index)) + val));
}else {
set(val, keys);
}
} |
public io.openmessaging.Message poll() {
if (((bucketList.size()) == 0) || ((queue) == null)) {
return null;
}
for (int i = 0; i < (bucketList.size()); i++) {
io.openmessaging.Message message = messageStore.pullMessage(queue, bucketList.get(i));
if (message == null)
bucke... | public io.openmessaging.Message poll() {
if (((bucketList.size()) == 0) || ((queue) == null)) {
return null;
}
for (int i = 0; i < (bucketList.size()); i++) {
io.openmessaging.Message message = messageStore.pullMessage(queue, bucketList.get(i));
if (message != null) {
ret... |
public void onCaptureCompleted(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, android.hardware.camera2.TotalCaptureResult result) {
super.onCaptureCompleted(session, request, result);
android.widget.Toast.makeText(this, ("Saved:" + file), Toast.LENGTH_SHO... | public void onCaptureCompleted(android.hardware.camera2.CameraCaptureSession session, android.hardware.camera2.CaptureRequest request, android.hardware.camera2.TotalCaptureResult result) {
super.onCaptureCompleted(session, request, result);
android.widget.Toast.makeText(this, ("Saved:" + file), Toast.LENGTH_SHO... |
private com.afunx.xml.model.SoftApXmlModel getNextSoftap(com.afunx.service.Testcases testcases) {
++(mTotalCount);
java.util.List<com.afunx.xml.model.SoftApXmlModel> softaps = testcases.getSelectedSoftaps();
int size = testcases.getTestCount();
com.afunx.xml.model.SoftApXmlModel softap = softaps.get(mIn... | private com.afunx.xml.model.SoftApXmlModel getNextSoftap(com.afunx.service.Testcases testcases) {
++(mTotalCount);
java.util.List<com.afunx.xml.model.SoftApXmlModel> softaps = testcases.getSelectedSoftaps();
int size = testcases.getSelectedSoftaps().size();
com.afunx.xml.model.SoftApXmlModel softap = so... |
public static org.echocat.gradle.plugins.golang.model.OperatingSystem resolveForJava(java.lang.String javaArchName) throws java.lang.IllegalArgumentException {
if (javaArchName != null) {
final java.lang.String asLower = javaArchName.toLowerCase(java.util.Locale.US);
for (final org.echocat.gradle.pl... | public static org.echocat.gradle.plugins.golang.model.OperatingSystem resolveForJava(java.lang.String javaArchName) throws java.lang.IllegalArgumentException {
if (javaArchName != null) {
final java.lang.String asLower = javaArchName.toLowerCase(java.util.Locale.US).trim();
for (final org.echocat.gr... |
public static void init() {
net.minecraftforge.fml.common.registry.EntityRegistry.registerModEntity(net.thedragonteam.armorplus.entity.entityzombie.EntityEnderDragonZombie.class, "ender_dragon_zombie", net.thedragonteam.armorplus.entity.ARPEntities.ENDER_DRAGON_ZOMBIE, ArmorPlus.instance, 64, 1000, true, 8704, 6528... | public static void init() {
net.minecraftforge.fml.common.registry.EntityRegistry.registerModEntity(net.thedragonteam.armorplus.entity.entityzombie.EntityEnderDragonZombie.class, "ender_dragon_zombie", net.thedragonteam.armorplus.entity.ARPEntities.ENDER_DRAGON_ZOMBIE, ArmorPlus.instance, 64, 1, true, 8704, 65280);... |
public java.nio.file.FileVisitResult visitFile(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs) throws java.io.IOException {
java.lang.String logs = science.atlarge.granula.util.FileUtil.readFile(file);
for (java.lang.String line : logs.split("\n")) {
if (line.contains("- run ... | public java.nio.file.FileVisitResult visitFile(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs) throws java.io.IOException {
java.lang.String logs = science.atlarge.granula.util.FileUtil.readFile(file);
for (java.lang.String line : logs.split("\n")) {
if (line.contains("- run ... |
public static datastructure.Node findSubInCache(java.util.List<datastructure.Node> tree, datastructure.Node n) {
for (datastructure.Node curr : tree) {
boolean conclusion = n.conclusion.equals(curr.conclusion);
boolean hypotheses = n.hypotheses.containsAll(curr.hypotheses);
if (conclusion &&... | public static datastructure.Node findSubInCache(java.util.List<datastructure.Node> tree, datastructure.Node n) {
for (datastructure.Node curr : tree) {
boolean conclusion = n.conclusion.equals(curr.conclusion);
boolean hypotheses = (n.hypotheses.containsAll(curr.hypotheses)) && (curr.hypotheses.cont... |
private void validateInputs() {
java.lang.String projectId = projectIdWidget.getText().toString();
if ((projectId.length()) == 5) {
try {
writeProjectInDb();
} catch (android.database.sqlite.SQLiteConstraintException e) {
setErrorMessageToWidget(projectIdWidget, "ID is al... | private void validateInputs() {
java.lang.String projectId = projectIdWidget.getText().toString();
if ((projectId.length()) == 5) {
try {
writeProjectInDb();
finishActivityAndShowAnimation();
} catch (android.database.sqlite.SQLiteConstraintException e) {
setE... |
public void removeStudentFromCourse(java.lang.Integer studentId, java.lang.Integer courseId, boolean force) {
by.triumgroup.recourse.entity.model.Course course = by.triumgroup.recourse.util.RepositoryCallWrapper.wrapJPACall(() -> courseRepository.findOne(courseId));
by.triumgroup.recourse.entity.model.User user... | public void removeStudentFromCourse(java.lang.Integer courseId, java.lang.Integer studentId, boolean force) {
by.triumgroup.recourse.entity.model.Course course = by.triumgroup.recourse.util.RepositoryCallWrapper.wrapJPACall(() -> courseRepository.findOne(courseId));
by.triumgroup.recourse.entity.model.User user... |
public static com.ambergleam.android.paperplane.model.Moon newInstance(android.content.Context context, int canvasWidth, int canvasHeight) {
com.ambergleam.android.paperplane.model.Moon moon = new com.ambergleam.android.paperplane.model.Moon();
moon.setBitmap(android.graphics.BitmapFactory.decodeResource(contex... | public static com.ambergleam.android.paperplane.model.Moon newInstance(android.content.Context context, int canvasWidth, int canvasHeight) {
com.ambergleam.android.paperplane.model.Moon moon = new com.ambergleam.android.paperplane.model.Moon();
moon.setBitmap(android.graphics.BitmapFactory.decodeResource(contex... |
public com.github.ddth.djs.bo.log.TaskLogBo setTimestampFinish(java.util.Date timestamp) {
if (timestamp == null) {
timestamp = new java.util.Date();
}
setAttribute(com.github.ddth.djs.bo.log.TaskLogBo.ATTR_TIMESTAMP_FINISH, timestamp);
java.util.Date timestampPickup = getTimestampPickup();
... | public com.github.ddth.djs.bo.log.TaskLogBo setTimestampFinish(java.util.Date timestamp) {
setAttribute(com.github.ddth.djs.bo.log.TaskLogBo.ATTR_TIMESTAMP_FINISH, timestamp);
if (timestamp == null) {
setAttribute(com.github.ddth.djs.bo.log.TaskLogBo.ATTR_DURATION_FINISH, null);
}
java.util.Date... |
public java.lang.String beforeView() {
if (org.egov.web.actions.masters.SchemeAction.LOGGER.isDebugEnabled())
org.egov.web.actions.masters.SchemeAction.LOGGER.debug("..Inside Before View Method..");
this.scheme = ((org.egov.commons.Scheme) (persistenceService.find("from Scheme where id=?", this.sch... | public java.lang.String beforeView() {
if (org.egov.web.actions.masters.SchemeAction.LOGGER.isDebugEnabled())
org.egov.web.actions.masters.SchemeAction.LOGGER.debug("..Inside Before View Method..");
scheme = ((org.egov.commons.Scheme) (persistenceService.find("from Scheme where id=?", scheme.getId(... |
public static void circleBorderImageView(final android.content.Context context, android.widget.ImageView imageView, java.lang.String url, int placehorder, float borderwidth, int bordercolor) {
com.bumptech.glide.request.RequestOptions options = new com.bumptech.glide.request.RequestOptions();
options.placeholde... | public static void circleBorderImageView(final android.content.Context context, android.widget.ImageView imageView, java.lang.String url, int placehorder, float borderwidth, int bordercolor) {
com.bumptech.glide.request.RequestOptions options = new com.bumptech.glide.request.RequestOptions();
if (placehorder !=... |
public void disconnect(java.lang.Long key) {
if (key == null)
return ;
intraplex.livelook.LogMapEntry e = logMap.get(key);
if (e == null)
return ;
intraplex.livelook.Stream stream = map.get(key);
if (stream == null)
return ;
logMap.remove(key);
removeKe... | public void disconnect(java.lang.Long key) {
if (key == null)
return ;
intraplex.livelook.LogMapEntry e = logMap.get(key);
if (e == null)
return ;
intraplex.livelook.Stream stream = map.get(key);
if (stream == null)
return ;
removeKey = key;
mapUpdate =... |
public void loadGame(int _boardSize, java.io.File _saveFile, int _loadJSONPosition) {
try {
loadJSONPosition = _loadJSONPosition;
saveFile = _saveFile;
boardSize = _boardSize;
board = new me.valesken.jeff.sudoku_structure.Board(boardSize);
java.io.BufferedReader buff = new ja... | public void loadGame(int _boardSize, java.io.File _saveFile, int _loadJSONPosition) {
try {
loadJSONPosition = _loadJSONPosition;
saveFile = _saveFile;
boardSize = _boardSize;
board = new me.valesken.jeff.sudoku_structure.Board(boardSize);
java.io.BufferedReader buff = new ja... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (nuclei3.logs.Logs.TRACE) {
mTrace = new nuclei3.logs.Trace();
mTrace.onCreate(getClass());
}
if (savedInstanceState == null) {
nuclei3.notifications.NotificationManager manager... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (nuclei3.logs.Logs.TRACE) {
mTrace = new nuclei3.logs.Trace();
mTrace.onCreate(getClass());
}
if (savedInstanceState == null) {
nuclei3.notifications.NotificationManager.dismiss... |
public void mouseReleased(java.awt.event.MouseEvent arg0) {
if ((this.um) == null) {
throw new java.lang.RuntimeException("MakeUserMoveController.um was null when mouseReleased was called");
}
if (um.isValid()) {
um.pushMove(l);
l.getBoard().settleTiles();
}
um.finishMove(l);... | public void mouseReleased(java.awt.event.MouseEvent arg0) {
if ((this.um) == null) {
return ;
}
if (um.isValid()) {
um.pushMove(l);
l.getBoard().settleTiles();
}
um.finishMove(l);
if (l.isFinished()) {
lv.endLevel();
return ;
}
lv.repaint();
th... |
Demo.ProductoIce productoIce = null;
productoIce.categoriaId = producto.getCategoriaId();
productoIce.estanteriaId = producto.getEstanteriaId();
productoIce.fechaCaducidad = producto.getFechaCaducidad();
productoIce.nombre = producto.getNombre();
productoIce.productoId = producto.getProductoId()... | Demo.ProductoIce productoIce = new Demo.ProductoIce();
productoIce.categoriaId = producto.getCategoriaId();
productoIce.estanteriaId = producto.getEstanteriaId();
productoIce.fechaCaducidad = producto.getFechaCaducidad();
productoIce.nombre = producto.getNombre();
productoIce.productoId = produc... |
public void paste() {
ca.mcgill.cs.stg.jetuml.framework.GraphFrame frame = ((ca.mcgill.cs.stg.jetuml.framework.GraphFrame) (aDesktop.getSelectedFrame()));
if (frame == null) {
return ;
}
ca.mcgill.cs.stg.jetuml.graph.Graph curGraph = frame.getGraph();
ca.mcgill.cs.stg.jetuml.framework.GraphP... | public void paste() {
ca.mcgill.cs.stg.jetuml.framework.GraphFrame frame = ((ca.mcgill.cs.stg.jetuml.framework.GraphFrame) (aDesktop.getSelectedFrame()));
if (frame == null) {
return ;
}
ca.mcgill.cs.stg.jetuml.framework.GraphPanel panel = frame.getGraphPanel();
try {
ca.mcgill.cs.st... |
public void centerMapOnLocation(android.location.Location location, java.lang.String title) {
android.util.Log.i("Maps Activity", "Center on map - location");
com.google.android.gms.maps.model.LatLng selectedLatLng = new com.google.android.gms.maps.model.LatLng(location.getLatitude(), location.getLongitude());
... | public void centerMapOnLocation(android.location.Location location, java.lang.String title) {
android.util.Log.i("Maps Activity", "Center on map - location");
com.google.android.gms.maps.model.LatLng selectedLatLng = new com.google.android.gms.maps.model.LatLng(location.getLatitude(), location.getLongitude());
... |
private double cosNumerator(double[] vector) {
int cosValue = 0;
for (int ii = 0; ii < (Storage.BackData.vocabAfter); ii++) {
cosValue += (vector[ii]) * (qVector[ii]);
}
return cosValue;
} | private double cosNumerator(double[] vector) {
double cosValue = 0;
for (int ii = 0; ii < (Storage.BackData.vocabAfter); ii++) {
cosValue = cosValue + ((vector[ii]) * (qVector[ii]));
}
return cosValue;
} |
public void sucessfullyCon() {
if (!(_waiting))
renewPanel();
_retry.setVisible(false);
_conPanel.setVisible(true);
_succesfull = true;
_waiting = false;
_icon.setImage(org.jivesoftware.resource.SparkRes.getImageIcon(SparkRes.SMALL_CHECK).getImage());
_label.setText(org.jivesoft... | public void sucessfullyCon() {
if (!(_succesfull)) {
if (!(_waiting))
renewPanel();
_retry.setVisible(false);
_conPanel.setVisible(true);
_succesfull = true;
_waiting = false;
_icon.setImage(org.jivesoftware.resource.SparkRes.getImageIcon(SparkRes... |
public void createElement() {
book1 = new fhj.shelf.utils.Book("Book1", "Author1");
book2 = new fhj.shelf.utils.Book("Book2", "Author2");
col = new fhj.shelf.utils.BookCollection("Collection of Books");
col.addElement(book1);
col.addElement(book2);
cd = new fhj.shelf.utils.CD("CD1", 20);
ele... | public void createElement() {
book1 = new fhj.shelf.utils.Book("Book1", "Author1");
book2 = new fhj.shelf.utils.Book("Book2", "Author2");
col = new fhj.shelf.utils.BookCollection("Collection of Books");
col.addElement(book1);
col.addElement(book2);
cd = new fhj.shelf.utils.CD("CD1", 20);
ele... |
public void postInit() {
com.feed_the_beast.ftbl.api.client.gui.LMGuiHandlerRegistry.add(FTBUGuiHandler.instance);
java.util.Map<java.lang.String, net.minecraft.client.renderer.entity.RenderPlayer> skinMap = com.feed_the_beast.ftbl.api.client.FTBLibClient.mc().getRenderManager().getSkinMap();
net.minecraft.... | public void postInit() {
java.util.Map<java.lang.String, net.minecraft.client.renderer.entity.RenderPlayer> skinMap = com.feed_the_beast.ftbl.api.client.FTBLibClient.mc().getRenderManager().getSkinMap();
net.minecraft.client.renderer.entity.RenderPlayer render = skinMap.get("default");
render.addLayer(Badge... |
public void start(javafx.stage.Stage stage) throws java.lang.Exception {
this.stage = stage;
itinerary.main.Logic logic = new itinerary.main.Logic();
if (!(logic.isConfigured())) {
new itinerary.userinterface.FileNameRequestDialog(listener).start(stage);
}else {
openMainApplication(this.... | public void start(javafx.stage.Stage stage) throws java.lang.Exception {
this.stage = stage;
if (!(logic.isConfigured())) {
new itinerary.userinterface.FileNameRequestDialog(listener).start(stage);
}else {
openMainApplication(this.stage);
}
} |
public java.util.ArrayList<ir.rasen.charsoo.controller.object.PackageInfoCustom> getAppList() {
java.util.ArrayList<ir.rasen.charsoo.controller.object.PackageInfoCustom> temp = new java.util.ArrayList<>();
for (int i = 0; i < (appList.size()); i++) {
temp.add(appList.get(i));
}
return temp;
} | public java.util.ArrayList<ir.rasen.charsoo.controller.object.PackageInfoCustom> getAppList() {
if ((appList) != null) {
java.util.ArrayList<ir.rasen.charsoo.controller.object.PackageInfoCustom> temp = new java.util.ArrayList<>();
for (int i = 0; i < (appList.size()); i++) {
temp.add(app... |
public void postTick() {
(tickCounter)++;
if (((tickCounter) % (intervalTicks)) == 0) {
com.github.fishio.power_ups.PowerUp pu = getRandomPowerUp();
pf.add(getRandomPowerUp());
log.log(LogLevel.DEBUG, (("Added a PowerUp of type \"" + (pu.getName())) + "\""));
}
} | public void postTick() {
(tickCounter)++;
if (((tickCounter) % (intervalTicks)) == 0) {
com.github.fishio.power_ups.PowerUp pu = getRandomPowerUp();
pf.add(pu);
log.log(LogLevel.DEBUG, (("Added a PowerUp of type \"" + (pu.getName())) + "\""));
}
} |
public void setX(float x) {
float offset = (x > (rectangle.getX())) ? x - (rectangle.getX()) : (rectangle.getX()) - x;
for (game.ui.levelselect.LevelItem item : items) {
item.setX(((item.getX()) + offset));
}
rectangle.setX(((rectangle.getX()) + offset));
} | public void setX(float x) {
float offset = (rectangle.getX()) - x;
for (game.ui.levelselect.LevelItem item : items) {
item.setX(((item.getX()) - offset));
}
rectangle.setX(((rectangle.getX()) - offset));
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.