buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private boolean checkExpression() {
boolean bResult = false;
expFormula = this.cbExpression.getText();
if ((expFormula.length()) > 0) {
try {
bResult = edu.rice.cs.hpc.viewer.metric.DerivedMetric.evaluateExpression(expFormula, varMap, fctMap);
} catch (com.graphbuilder.math.Expre... | private boolean checkExpression() {
boolean bResult = false;
expFormula = this.cbExpression.getText();
if ((expFormula.length()) > 0) {
try {
bResult = edu.rice.cs.hpc.viewer.metric.DerivedMetric.evaluateExpression(expFormula, varMap, fctMap);
} catch (com.graphbuilder.math.Expre... |
public static int getGradeNum(java.lang.String grade) {
int gradeNum = -1;
if (grade.equals("K"))
gradeNum = 0;
else
if (grade.equals("H"))
gradeNum = 9;
else {
try {
gradeNum = java.lang.Integer.parseInt(grade);
} catch (java.lang.... | public static int getGradeNum(java.lang.String grade) {
if (grade == null)
return -1;
int gradeNum = -1;
if (grade.equals("K"))
gradeNum = 0;
else
if (grade.equals("H"))
gradeNum = 9;
else {
try {
gradeNum = java.lang.Integer.p... |
private void balanceTwoPagesRoot() {
if (((offspringPages[0].size) + (offspringPages[1].size)) < (nodes.length)) {
mergeRoot();
}else {
int minNodes = ((nodes.length) * 2) / 3;
if ((offspringPages[0].size) < minNodes) {
rotateRight(0);
}else
if ((offspring... | private void balanceTwoPagesRoot() {
if (((offspringPages[0].size) + (offspringPages[1].size)) < (nodes.length)) {
mergeRoot();
}else {
int minNodes = ((nodes.length) * 2) / 3;
if ((offspringPages[0].size) < minNodes) {
rotateLeft(0);
}else
if ((offspringP... |
public void add(T value) {
if (empty) {
this.value = value;
empty = false;
}
if ((next) == null) {
next = new list.LinkedList<>(value);
}else {
next.add(value);
}
} | public void add(T value) {
if (empty) {
this.value = value;
empty = false;
}else
if ((next) == null) {
next = new list.LinkedList<>(value);
}else {
next.add(value);
}
} |
public void testEnabledNoHighlight() throws java.io.IOException {
dk.statsbiblioteket.summa.search.api.SummaSearcher searcher = getAvailableSearcher();
if (searcher == null) {
return ;
}
dk.statsbiblioteket.summa.search.api.ResponseCollection responses = getFullStack().search(new dk.statsbibliot... | public void testEnabledNoHighlight() throws java.io.IOException {
dk.statsbiblioteket.summa.search.api.SummaSearcher searcher = getAvailableSearcher();
if (searcher == null) {
return ;
}
dk.statsbiblioteket.summa.search.api.ResponseCollection responses = getAvailableSearcher().search(new dk.stat... |
public T find(java.util.UUID id) {
T entity = null;
org.hibernate.Session session = at.fhv.itm14.fhvgis.persistence.utils.HibernateUtil.getSessionFactory().openSession();
try {
session.beginTransaction();
entity = session.load(clazz, id);
session.getTransaction().commit();
} catc... | public T find(java.util.UUID id) {
T entity = null;
org.hibernate.Session session = at.fhv.itm14.fhvgis.persistence.utils.HibernateUtil.getSessionFactory().openSession();
try {
session.beginTransaction();
entity = session.get(clazz, id);
session.getTransaction().commit();
} catch... |
public static void main(java.lang.String[] args) throws java.lang.Exception {
com.accenture.spring.batch.util.SecurityUtil.loadSecuritySetting();
java.lang.String inputFile = "C:\\Users\\pratibha.ghorpade\\git\\enhanced-spring-batch\\src\\test\\resources\\test.properties";
java.lang.String outFile = "C:\\Us... | public static void main(java.lang.String[] args) throws java.lang.Exception {
com.accenture.spring.batch.util.SecurityUtil.loadSecuritySetting();
java.lang.String inputFile = "C:\\Users\\pratibha.ghorpade\\git\\enhanced-spring-batch\\src\\test\\resources\\test.properties";
java.lang.String outFile = "C:\\Us... |
private java.lang.Object _findFromSpill(java.lang.String key) {
int hashSize = (_hashMask) + 1;
int i = hashSize + (hashSize >> 1);
for (int end = i + (_spillCount); i < end; ++i) {
if (key.equals(_keys[i])) {
return _values[1];
}
}
return null;
} | private java.lang.Object _findFromSpill(java.lang.String key) {
int hashSize = (_hashMask) + 1;
int i = hashSize + (hashSize >> 1);
for (int end = i + (_spillCount); i < end; ++i) {
if (key.equals(_keys[i])) {
return _values[i];
}
}
return null;
} |
public static void main(java.lang.String[] args) {
util.save.Load load = new util.save.Load();
java.io.File f = new java.io.File("src/util.tracks/simple_track.json");
util.save.LoadedRailway l = load.loadFromFile(f, "src/util.tracks/simple_track.json");
util.save.Save save = new util.save.Save();
sa... | public static void main(java.lang.String[] args) {
util.save.Load load = new util.save.Load();
java.io.File f = new java.io.File("src/util.tracks/simple_track.json");
util.save.LoadedRailway l = load.loadFromFile(f, "src/util.tracks/simple_track.json", null);
util.save.Save save = new util.save.Save();
... |
public java.lang.String toString() {
return ((((((((("ParsedFileField{" + "description='") + (description)) + '\'') + ", link='") + (link)) + '\'') + ", fileType='") + (fileType)) + '\'') + '}';
} | public java.lang.String toString() {
return ((((((((("ParsedFileField{" + "description='") + (description.get())) + '\'') + ", link='") + (link.get())) + '\'') + ", fileType='") + (fileType.get())) + '\'') + '}';
} |
public double getMatchPercent(java.lang.String desc, double weight, java.util.HashMap<java.lang.String, java.lang.Integer> frequency) {
double percent = 0;
java.lang.String[] words = desc.split(" ");
for (java.lang.String word : words) {
if (frequency.containsKey(word))
percent += freque... | public double getMatchPercent(java.lang.String desc, double weight, java.util.HashMap<java.lang.String, java.lang.Integer> frequency) {
double percent = 0;
java.lang.String[] words = desc.split(" ");
for (java.lang.String word : words) {
word = word.toLowerCase();
if (frequency.containsKey(w... |
public io.fabric8.kubernetes.client.dsl.NamespaceVisitFromServerGetDeleteRecreateApplicable<java.util.List<io.fabric8.kubernetes.api.model.HasMetadata>, java.lang.Boolean> resource(io.fabric8.kubernetes.api.model.HasMetadata item) {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetDel... | public io.fabric8.kubernetes.client.dsl.NamespaceVisitFromServerGetDeleteRecreateApplicable<java.util.List<io.fabric8.kubernetes.api.model.HasMetadata>, java.lang.Boolean> resource(io.fabric8.kubernetes.api.model.HasMetadata item) {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetDel... |
public double[][] getArrayCopy() {
double[][] a = new double[getRowDimension()][getColumnDimension()];
for (int i = 0; i < (getRowDimension()); i++) {
for (int j = 0; i < (getColumnDimension()); j++) {
b[i][j] = j4k[i][j];
}
}
return a;
} | public double[][] getArrayCopy() {
double[][] a = new double[getRowDimension()][getColumnDimension()];
for (int i = 0; i < (getRowDimension()); i++) {
for (int j = 0; i < (getColumnDimension()); j++) {
a[i][j] = j4k[i][j];
}
}
return a;
} |
public void setUp() {
parent = com.codeaffine.eclipse.swt.test.util.ShellHelper.createShell(displayHelper);
scrollable = com.codeaffine.eclipse.swt.widget.scrollable.TreeHelper.createTree(parent, 1, 1);
adapter = new com.codeaffine.eclipse.swt.widget.scrollable.ScrollableAdapterFactory().create(scrollable, ... | public void setUp() {
parent = com.codeaffine.eclipse.swt.test.util.ShellHelper.createShell(displayHelper);
scrollable = com.codeaffine.eclipse.swt.widget.scrollable.TreeHelper.createTree(parent, 1, 1);
adapter = new com.codeaffine.eclipse.swt.widget.scrollable.ScrollableAdapterFactory().create(scrollable, ... |
public void avoidDuplicateUser() {
de.fred4jupiter.fredbet.domain.AppUser appUser = de.fred4jupiter.fredbet.domain.AppUserBuilder.create().withUsernameAndPassword("michael", "michael").withRole(FredBetRole.ROLE_USER).build();
userService.insertAppUser(appUser);
try {
userService.insertAppUser(appUse... | public void avoidDuplicateUser() {
de.fred4jupiter.fredbet.domain.AppUser appUser = de.fred4jupiter.fredbet.domain.AppUserBuilder.create().withUsernameAndPassword("michael", "michael").withRole(FredBetRole.ROLE_USER).build();
userService.insertAppUser(appUser);
try {
userService.insertAppUser(appUse... |
public void testGenerateMapComprehension() {
java.lang.String query = "using X,Y: from x:X, y:Y reportMap y->x end";
de.uni_koblenz.jgralab.greql2.evaluator.GreqlEvaluator eval = new de.uni_koblenz.jgralab.greql2.evaluator.GreqlEvaluator(query, null, null);
eval.createOptimizedSyntaxGraph();
de.uni_kobl... | public void testGenerateMapComprehension() {
java.lang.String query = "using X,Y: from x:X, y:Y reportMap y->x end";
de.uni_koblenz.jgralab.greql2.evaluator.GreqlEvaluator eval = new de.uni_koblenz.jgralab.greql2.evaluator.GreqlEvaluator(query, null, null);
eval.createOptimizedSyntaxGraph();
de.uni_kobl... |
public void switchPower() {
de.tf.magiclamp.HomeFragment.lampConfig.setActive((!(de.tf.magiclamp.HomeFragment.lampConfig.getActive())));
de.tf.magiclamp.HomeFragment.service.setConfig(de.tf.magiclamp.HomeFragment.lampConfig, new retrofit.Callback<de.tf.magiclamp.model.LampConfig>() {
@java.lang.Override... | public void switchPower() {
if ((de.tf.magiclamp.HomeFragment.lampConfig) == null) {
return ;
}
de.tf.magiclamp.HomeFragment.lampConfig.setActive((!(de.tf.magiclamp.HomeFragment.lampConfig.getActive())));
de.tf.magiclamp.HomeFragment.service.setConfig(de.tf.magiclamp.HomeFragment.lampConfig, new... |
public edu.cmu.cmulib.CoolMatrixUtility.core.Mat initL() {
edu.cmu.cmulib.CoolMatrixUtility.core.Mat initL = new edu.cmu.cmulib.CoolMatrixUtility.core.Mat(src.rows, k);
for (int j = 0; j < (k); j++) {
for (int i = 0; i < (src.rows); i++) {
initL.data[(((k) * (src.rows)) + i)] = java.lang.Mat... | public edu.cmu.cmulib.CoolMatrixUtility.core.Mat initL() {
edu.cmu.cmulib.CoolMatrixUtility.core.Mat initL = new edu.cmu.cmulib.CoolMatrixUtility.core.Mat(src.rows, k);
for (int j = 0; j < (k); j++) {
for (int i = 0; i < (src.rows); i++) {
initL.data[((j * (src.rows)) + i)] = java.lang.Math.... |
public void translatePercent(com.google.gwt.dom.client.Element el, double x, double y) {
java.lang.String cssText = null;
if ((has3d()) && (!(com.googlecode.mgwt.ui.client.MGWT.getOsDetection().isDesktop()))) {
cssText = ((("translate3d(" + x) + "%, ") + y) + "%, 0px)";
}else {
cssText = (((... | public void translatePercent(com.google.gwt.dom.client.Element el, double x, double y) {
final java.lang.String cssText;
if ((has3d()) && (!(com.googlecode.mgwt.ui.client.MGWT.getOsDetection().isDesktop()))) {
cssText = ((("translate3d(" + x) + "%, ") + y) + "%, 0px)";
}else {
cssText = ((("... |
public boolean isMap(model.MyVector xy) {
if (((((xy.getX()) >= 800) || ((xy.getX()) < 0)) || ((xy.getY()) >= 600)) || ((xy.getX()) < 0))
return false;
else
return model.Map.palya[xy.getX()][xy.getY()];
} | public boolean isMap(model.MyVector xy) {
if (((((xy.getX()) >= 800) || ((xy.getX()) < 0)) || ((xy.getY()) >= 600)) || ((xy.getY()) < 0))
return false;
else
return model.Map.palya[xy.getX()][xy.getY()];
} |
com.puppycrawl.tools.checkstyle.checks.imports.AccessResult checkAccess(final java.lang.String forImport, final java.lang.String inPkg) {
final com.puppycrawl.tools.checkstyle.checks.imports.AccessResult retVal = localCheckAccess(forImport, inPkg);
if (retVal != (AccessResult.UNKNOWN)) {
return retVal;
... | com.puppycrawl.tools.checkstyle.checks.imports.AccessResult checkAccess(final java.lang.String forImport, final java.lang.String inPkg) {
com.puppycrawl.tools.checkstyle.checks.imports.AccessResult result;
final com.puppycrawl.tools.checkstyle.checks.imports.AccessResult retVal = localCheckAccess(forImport, inP... |
private void initView() {
resetRealm();
realm = io.realm.Realm.getInstance(getRealmConfig());
io.realm.RealmResults<io.mochadwi.todo_go.model.todo.TodoItem> toDoItems = realm.where(io.mochadwi.todo_go.model.todo.TodoItem.class).findAllSorted("id", Sort.ASCENDING);
io.mochadwi.todo_go.todo.ToDoRealmAdapt... | private void initView() {
resetRealm();
realm = io.realm.Realm.getInstance(getRealmConfig());
io.realm.RealmResults<io.mochadwi.todo_go.model.todo.TodoItem> toDoItems = realm.where(io.mochadwi.todo_go.model.todo.TodoItem.class).findAllSorted("id", Sort.ASCENDING);
io.mochadwi.todo_go.todo.ToDoRealmAdapt... |
protected void payRecurring(org.avr.simplecheckbook.dataobjects.RecurringPymt pymt) throws org.avr.simplecheckbook.utils.IncalculableDueDate {
org.avr.simplecheckbook.dataobjects.Transaction t = new org.avr.simplecheckbook.dataobjects.Transaction();
t.setTxDate(java.sql.Timestamp.valueOf(java.time.LocalDateTime... | private void payRecurring(org.avr.simplecheckbook.dataobjects.RecurringPymt pymt) throws org.avr.simplecheckbook.utils.IncalculableDueDate {
org.avr.simplecheckbook.dataobjects.Transaction t = new org.avr.simplecheckbook.dataobjects.Transaction();
t.setTxDate(java.sql.Timestamp.valueOf(java.time.LocalDateTime.n... |
private boolean validateFields() {
boolean isAliasOk = validateTextField(aliasNameField);
boolean isDriverOk = validateComboBox(driverBox);
boolean isUrlOk = validateTextField(urlField);
boolean isUserOk = validateTextField(userField);
boolean isPasswordOk = validateTextField(passwordField);
ret... | private boolean validateFields() {
boolean isAliasOk = validateTextField(aliasNameField);
boolean isDriverOk = true;
boolean isUrlOk = validateTextField(urlField);
boolean isUserOk = validateTextField(userField);
boolean isPasswordOk = validateTextField(passwordField);
return (((isAliasOk && isD... |
public void testReadAttributes() throws java.io.IOException {
java.nio.file.Path pathToTest = java.nio.file.Paths.get(hdfs.jsr203.TestAttributes.clusterUri);
org.junit.Assert.assertNotNull(java.nio.file.Files.readAttributes(pathToTest, "*", java.nio.file.LinkOption.NOFOLLOW_LINKS));
org.junit.Assert.assertN... | public void testReadAttributes() throws java.io.IOException {
java.nio.file.Path pathToTest = java.nio.file.Paths.get(hdfs.jsr203.TestAttributes.clusterUri);
org.junit.Assert.assertNotNull(java.nio.file.Files.readAttributes(pathToTest, "*"));
org.junit.Assert.assertNotNull(java.nio.file.Files.readAttributes... |
private boolean OldSpellingEintrag() {
begin("OldSpellingEintrag");
if (!(DeSpracheKopf()))
return reject();
while (!(OldSpellingTemplate()))
if (!(Line()))
return reject();
if (!(EOL()))
return reject();
return accept();
} | private boolean OldSpellingEintrag() {
begin("OldSpellingEintrag");
if (!(DeSpracheKopf()))
return reject();
while (!(OldSpellingTemplate()))
if (!(Line()))
return reject();
return accept();
} |
public void setUp() throws java.lang.Exception {
super.setUp();
instance = new org.apache.solr.security.BasicAuthStandaloneTest.SolrInstance("inst", null);
instance.setUp();
java.lang.System.setProperty("solr.solr.home", instance.getHomeDir().toString());
jetty = createJetty(instance);
initCore(... | public void setUp() throws java.lang.Exception {
super.setUp();
instance = new org.apache.solr.security.BasicAuthStandaloneTest.SolrInstance("inst", null);
instance.setUp();
jetty = createJetty(instance);
initCore("solrconfig.xml", "schema.xml", instance.getHomeDir().toString());
securityConfHan... |
private java.lang.String toHexString(byte[] byteArr, int length) {
java.lang.StringBuffer buff = new java.lang.StringBuffer();
for (int i = 0; i < length; i++) {
buff.append(java.lang.String.format("%02X", byteArr[i]));
if (i < ((responseLength) - 1)) {
buff.append(":");
}
... | private java.lang.String toHexString(byte[] byteArr, int length) {
java.lang.StringBuffer buff = new java.lang.StringBuffer();
for (int i = 0; i < length; i++) {
buff.append(java.lang.String.format("%02X", byteArr[i]));
if (i < (length - 1)) {
buff.append(":");
}
}
re... |
public void actionPerformed(java.awt.event.ActionEvent e) {
if (!(RMOS.getMachines().isEmpty())) {
Recycling.RecyclingData.RecyclingMachine RCM = selectedRCM();
RMOS.removeMachineWithID(RCM.getID());
RMOS.saveStatus();
try {
updateMachineStats();
updateGlobalS... | public void actionPerformed(java.awt.event.ActionEvent e) {
if (!(RMOS.getMachines().isEmpty())) {
Recycling.RecyclingData.RecyclingMachine RCM = selectedRCM();
RMOS.removeMachineWithID(RCM.getID());
RMOS.saveStatus();
updateRCMList();
try {
updateMachineStats();
... |
private void switchToMenu(javafx.event.ActionEvent event) {
try {
pass2("customerMenu.fxml");
javafx.scene.Parent home_page = javafx.fxml.FXMLLoader.load(getClass().getResource("customerMenu.fxml"));
javafx.scene.Scene home_page_scene = new javafx.scene.Scene(home_page);
javafx.stage... | private void switchToMenu(javafx.event.ActionEvent event) {
try {
javafx.scene.Parent home_page = javafx.fxml.FXMLLoader.load(getClass().getResource("customerMenu.fxml"));
javafx.scene.Scene home_page_scene = new javafx.scene.Scene(home_page);
javafx.stage.Stage app_stage = ((javafx.stage.St... |
private int compareDate(java.util.Calendar date1, java.util.Calendar date2) {
if ((date1 == null) && (date2 == null)) {
return 0;
}else
if (date1 == null) {
return -1;
}else
if (date2 == null) {
return 1;
}else {
return ... | private int compareDate(java.util.Calendar date1, java.util.Calendar date2) {
if ((date1 == null) && (date2 == null)) {
return 0;
}else
if (date1 == null) {
return 1;
}else
if (date2 == null) {
return -1;
}else {
return ... |
public void removeSelectionInterval(int index0, int index1) {
super.removeSelectionInterval(index0, index1);
java.util.Set<T> proxies = sel_model.getSelected();
for (int i = index0; i <= index1; i++) {
T proxy = model.getProxy(i);
if (proxy != null)
proxies.remove(proxy);
... | public void removeSelectionInterval(int index0, int index1) {
super.removeSelectionInterval(index0, index1);
java.util.Set<T> proxies = sel_model.getSelected();
for (int i = index0; i <= index1; i++) {
T proxy = model.getProxy(i, false);
if (proxy != null)
proxies.remove(proxy);
... |
public java.util.Set<de.switajski.priebes.flexibleorders.domain.embeddable.Address> retrieve(java.util.Collection<de.switajski.priebes.flexibleorders.domain.report.ReportItem> reportItems) {
java.util.Set<de.switajski.priebes.flexibleorders.domain.embeddable.Address> addresses = new java.util.HashSet<de.switajski.p... | public java.util.Set<de.switajski.priebes.flexibleorders.domain.embeddable.Address> retrieve(java.util.Collection<de.switajski.priebes.flexibleorders.domain.report.ReportItem> reportItems) {
java.util.Set<de.switajski.priebes.flexibleorders.domain.embeddable.Address> addresses = new java.util.HashSet<de.switajski.p... |
public void touchMove(float x, float y) {
float dx = java.lang.Math.abs((mLastX = x));
float dy = java.lang.Math.abs(((mLastY) - y));
if ((dx >= (org.kore.kolabnotes.android.draweditor.Line.TOUCH_TOLERANCE)) || (dy >= (org.kore.kolabnotes.android.draweditor.Line.TOUCH_TOLERANCE))) {
quadTo(mLastX, m... | public void touchMove(float x, float y) {
float dx = java.lang.Math.abs(((mLastX) - x));
float dy = java.lang.Math.abs(((mLastY) - y));
if ((dx >= (org.kore.kolabnotes.android.draweditor.Line.TOUCH_TOLERANCE)) || (dy >= (org.kore.kolabnotes.android.draweditor.Line.TOUCH_TOLERANCE))) {
quadTo(mLastX,... |
public void run() {
while (running) {
double oldFileSize = file.checkFileSize();
if (oldFileSize != (fileSize)) {
try {
history.setText(file.read(AdvanceInterface.ChatWindow.FILE_NAME));
} catch (java.io.FileNotFoundException e) {
e.printStackT... | public void run() {
while (running) {
double oldFileSize = file.checkFileSize();
if (oldFileSize != (fileSize)) {
try {
history.setText(file.read());
} catch (java.io.FileNotFoundException e) {
e.printStackTrace();
}
}
}... |
protected void onPreExecute() {
tvNoNetwork.setVisibility(View.GONE);
if ((topStoryIds) == null) {
srlNews.setVisibility(View.GONE);
pbNews.setVisibility(View.VISIBLE);
}
topStoryIds = new java.util.ArrayList<>();
mIsLoadingArticle = true;
super.onPreExecute();
} | protected void onPreExecute() {
tvNoNetwork.setVisibility(View.GONE);
if ((topStoryIds) == null) {
srlNews.setVisibility(View.GONE);
pbNews.setVisibility(View.VISIBLE);
topStoryIds = new java.util.ArrayList<>();
}
mIsLoadingArticle = true;
super.onPreExecute();
} |
private void refreshExpenseList() {
martinigt.einfachsparen.data.ExpenseDbHelper expenseDbHelper = new martinigt.einfachsparen.data.ExpenseDbHelper(dbHelper);
martinigt.einfachsparen.data.PeriodDbHelper periodDbHelper = new martinigt.einfachsparen.data.PeriodDbHelper(dbHelper);
martinigt.einfachsparen.model... | private void refreshExpenseList() {
martinigt.einfachsparen.data.ExpenseDbHelper expenseDbHelper = new martinigt.einfachsparen.data.ExpenseDbHelper(dbHelper);
martinigt.einfachsparen.data.PeriodDbHelper periodDbHelper = new martinigt.einfachsparen.data.PeriodDbHelper(dbHelper);
martinigt.einfachsparen.model... |
public void Update(java.lang.String response) {
handlepopulateInboxResponse(response);
mAdapter = new com.example.mrides.Notification.InboxAdapter(this, invitations);
mRecyclerView.setAdapter(mAdapter);
if ((getIntent().getParcelableExtra("NOTIFICATION")) != null) {
notification = ((com.google.f... | public void Update(java.lang.String response) {
java.lang.System.out.println(response);
handlepopulateInboxResponse(response);
mAdapter = new com.example.mrides.Notification.InboxAdapter(this, invitations);
mRecyclerView.setAdapter(mAdapter);
if ((getIntent().getParcelableExtra("NOTIFICATION")) != n... |
private org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider fileSystemMetadataProvider() {
org.springframework.core.io.DefaultResourceLoader loader = new org.springframework.core.io.DefaultResourceLoader();
org.springframework.core.io.Resource metadataResource = loader.getResource(("classpath:/" + (... | private org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider fileSystemMetadataProvider() {
org.springframework.core.io.DefaultResourceLoader loader = new org.springframework.core.io.DefaultResourceLoader();
org.springframework.core.io.Resource metadataResource = loader.getResource(metadataPath);
... |
private void dispatchAction(java.lang.String message) {
controlpanel.Action action = this.gson.fromJson(message, controlpanel.Action.class);
switch (action.type) {
case "SUCCESS_STEP" :
successStep();
break;
case "STATUS_MESSAGE" :
break;
case "ERROR" ... | private void dispatchAction(java.lang.String message) {
controlpanel.Action action = this.gson.fromJson(message, controlpanel.Action.class);
switch (action.getType()) {
case "SUCCESS_STEP" :
successStep();
break;
case "STATUS_MESSAGE" :
break;
case "ER... |
public hr.karlovrbic.notify.v1.model.json.CommentJson get(java.lang.Long id) {
hr.karlovrbic.notify.v1.model.entity.Comment comment = hr.karlovrbic.notify.v1.dao.manager.JPAEMProvider.getEntityManager().find(hr.karlovrbic.notify.v1.model.entity.Comment.class, id);
hr.karlovrbic.notify.v1.model.json.CommentJson ... | public hr.karlovrbic.notify.v1.model.json.CommentJson get(java.lang.Long id) {
hr.karlovrbic.notify.v1.model.entity.Comment comment = hr.karlovrbic.notify.v1.dao.manager.JPAEMProvider.getEntityManager().find(hr.karlovrbic.notify.v1.model.entity.Comment.class, id);
hr.karlovrbic.notify.v1.model.json.CommentJson ... |
private void presentLevelEnd() {
Assets.font.draw(game.batch, glyphLayout, (160 - ((glyphLayout.width) / 2)), (480 - 40));
glyphLayout.setText(Asset.font, "Level Complete!");
Assets.font.draw(game.batch, glyphLayout, (160 - ((glyphLayout.width) / 2)), 40);
} | private void presentLevelEnd() {
Assets.font.draw(game.batch, glyphLayout, (160 - ((glyphLayout.width) / 2)), (480 - 40));
glyphLayout.setText(Assets.font, "Level Complete!");
Assets.font.draw(game.batch, glyphLayout, (160 - ((glyphLayout.width) / 2)), 40);
} |
public int compare(web.business.MetadataIndex o1, web.business.MetadataIndex o2) {
try {
java.util.Date d1 = mode.getDateFormat().parse(o1.getName());
java.util.Date d2 = mode.getDateFormat().parse(o2.getName());
return d2.compareTo(d1);
} catch (java.text.ParseException e) {
thr... | public int compare(web.business.MetadataIndex o1, web.business.MetadataIndex o2) {
try {
java.util.Date d1 = mode.getDateFormat().parse(o1.getName());
java.util.Date d2 = mode.getDateFormat().parse(o2.getName());
return d2.compareTo(d1);
} catch (java.text.ParseException e) {
ret... |
private void displayUserPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.Cookie newCookie, java.lang.String sessionId, java.lang.String cookieExpireTs) throws java.io.IOException, javax.servlet.ServletException {
newCookie.setMaxAge(((com.servle... | private void displayUserPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.Cookie newCookie, java.lang.String sessionId, java.lang.String cookieExpireTs) throws java.io.IOException, javax.servlet.ServletException {
newCookie.setMaxAge(((com.servle... |
public java.util.ArrayList<org.w3c.dom.Node> visitApSlash(ApSlashContext ctx) {
java.lang.String filename = ctx.tag.getText();
tree = new DomTree(filename);
java.util.ArrayList<org.w3c.dom.Node> root = new java.util.ArrayList<org.w3c.dom.Node>();
root.add(tree.root);
stack.push(root);
return vis... | public java.util.ArrayList<org.w3c.dom.Node> visitApSlash(ApSlashContext ctx) {
java.lang.String filename = ctx.tag.getText();
if ((tree) == null)
tree = new DomTree(filename);
java.util.ArrayList<org.w3c.dom.Node> root = new java.util.ArrayList<org.w3c.dom.Node>();
root.add(tree.root);
... |
return ( value) -> {
if (!(games.strategy.triplea.settings.validators.InputValidator.IS_INTEGER.apply(value))) {
return false;
}
int intValue = java.lang.Integer.parseInt(value);
return (intValue >= min) && (intValue <= intValue);
};
} | return ( value) -> {
if (!(games.strategy.triplea.settings.validators.InputValidator.IS_INTEGER.apply(value))) {
return false;
}
int intValue = java.lang.Integer.parseInt(value);
return (intValue >= min) && (intValue <= max);
};
} |
public void showNotification(java.lang.String message) {
java.lang.CharSequence title = getText(NOTIFICATION);
java.lang.CharSequence content = message;
android.app.Notification notification = new android.app.Notification.Builder(this).setTicker(title).setWhen(java.lang.System.currentTimeMillis()).setConten... | public void showNotification(java.lang.String message) {
java.lang.CharSequence title = getText(NOTIFICATION);
java.lang.CharSequence content = message;
android.app.Notification notification = new android.app.Notification.Builder(this).setTicker(title).setWhen(java.lang.System.currentTimeMillis()).setConten... |
public static void initialize() {
logic.TaskProcessor.listToDisplay = new java.util.ArrayList<java.lang.String>();
logic.CommandQueue.initialize();
logic.ResponseQueue.initialize();
try {
Storage.Storage.retrieveFile();
java.util.ArrayList<logic.Task> taskList = Storage.Storage.loadTaskL... | public static void initialize() {
logic.TaskProcessor.listToDisplay = new java.util.ArrayList<java.lang.String>();
try {
Storage.Storage.retrieveFile();
java.util.ArrayList<logic.Task> taskList = Storage.Storage.loadTaskList();
logic.TaskProcessor.loadIntoDisplayList(taskList);
} cat... |
public java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities() {
java.util.List<org.springframework.security.core.GrantedAuthority> auths = new java.util.ArrayList<org.springframework.security.core.GrantedAuthority>();
java.util.List<cc.hunter.killua.entity.KilluaRole... | public java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities() {
java.util.List<org.springframework.security.core.GrantedAuthority> auths = new java.util.ArrayList<org.springframework.security.core.GrantedAuthority>();
java.util.List<cc.hunter.killua.entity.KilluaRole... |
private void fillVCardListView(java.util.ArrayList<java.lang.String> cardContent) {
adapter = new android.widget.ArrayAdapter(this, android.R.layout.simple_list_item_1, android.R.id.text1, cardContent);
this.cardContent = cardContent;
vCardListView.setAdapter(adapter);
if ((vCardListView.getVisibility()... | private void fillVCardListView(java.util.ArrayList<java.lang.String> cardContent) {
adapter = new android.widget.ArrayAdapter(this, android.R.layout.simple_list_item_1, android.R.id.text1, cardContent);
vCardListView.setAdapter(adapter);
if ((vCardListView.getVisibility()) == (android.view.View.GONE)) {
... |
private static void checkCalendarLoaded() {
if (!(com.unit5app.notifications.MyNotificationHandler.calendar.hasCalendarStartedLoading())) {
android.util.Log.d("MyNotificationHandler", "Loading calendar");
com.unit5app.notifications.MyNotificationHandler.calendar.loadCalendar(new com.unit5app.utils.M... | private static void checkCalendarLoaded() {
if (!(com.unit5app.notifications.MyNotificationHandler.calendar.hasCalendarStartedLoading())) {
android.util.Log.d("MyNotificationHandler", "Loading calendar");
com.unit5app.notifications.MyNotificationHandler.calendar.loadCalendar(new com.unit5app.utils.M... |
private void check(org.jschema.TokenType type, java.lang.String s) {
if ((T.getType()) != type) {
errors.add(((((((((("[" + (T.getLineNumber())) + ":") + (T.getColumn())) + "] expecting '") + s) + "', found '") + "'") + (T.getString())) + "'"));
}
next();
} | private void check(org.jschema.TokenType type, java.lang.String s) {
if ((T.getType()) != type) {
errors.add((((((((("[" + (T.getLineNumber())) + ":") + (T.getColumn())) + "] expecting '") + s) + "', found '") + (T.getString())) + "'"));
}
next();
} |
public org.gephi.scripting.wrappers.GySubGraph filter(org.gephi.scripting.wrappers.GyFilter filter) {
org.gephi.filters.api.FilterController filterController = org.openide.util.Lookup.getDefault().lookup(org.gephi.filters.api.FilterController.class);
org.gephi.filters.api.Query query;
if ((constructionQuery... | public org.gephi.scripting.wrappers.GySubGraph filter(org.gephi.scripting.wrappers.GyFilter filter) {
org.gephi.filters.api.FilterController filterController = org.openide.util.Lookup.getDefault().lookup(org.gephi.filters.api.FilterController.class);
org.gephi.filters.api.Query query;
if ((constructionQuery... |
public org.opensky.libadsb.Position decodePosition(double time, org.opensky.libadsb.Position receiver, org.opensky.libadsb.msgs.SurfacePositionMsg msg) {
org.opensky.libadsb.Position ret = decodePosition(time, msg);
if ((ret != null) && (receiver != null)) {
ret.setReasonable(((ret.isReasonable()) && (o... | public org.opensky.libadsb.Position decodePosition(double time, org.opensky.libadsb.Position receiver, org.opensky.libadsb.msgs.SurfacePositionMsg msg) {
org.opensky.libadsb.Position ret = decodePosition(time, msg);
if (((ret != null) && (receiver != null)) && (!(org.opensky.libadsb.PositionDecoder.withinReason... |
public void mouseEntered(java.awt.event.MouseEvent evt) {
if ((evt.getSource()) instanceof javax.swing.AbstractButton) {
javax.swing.AbstractButton button = ((javax.swing.AbstractButton) (evt.getSource()));
javax.swing.Action action = button.getAction();
if (action != null) {
jav... | public void mouseEntered(java.awt.event.MouseEvent evt) {
if ((evt.getSource()) instanceof javax.swing.AbstractButton) {
javax.swing.AbstractButton button = ((javax.swing.AbstractButton) (evt.getSource()));
javax.swing.Action action = button.getAction();
if (action != null) {
jav... |
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.widget.CheckBox checkBox = ((android.widget.CheckBox) (view.findViewById(R.id.checkbox1)));
adapter.setItem(position, (!(checkBox.isChecked())));
checkBox.toggle();
android.util.Log.v(u... | public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.widget.CheckBox checkBox = ((android.widget.CheckBox) (view.findViewById(R.id.checkbox1)));
adapter.setItem((position - 1), (!(checkBox.isChecked())));
checkBox.toggle();
android.util.L... |
public void pull(cn.nonocast.model.User user) {
this.pull();
this.id = user.getId();
this.email = user.getEmail();
this.name = user.getName();
this.role = user.getRole();
this.mobile = user.getMobile();
this.wechatid = user.getWechatid();
this.location = user.getLocation();
} | public void pull(cn.nonocast.model.User user) {
this.pull(user.getId());
this.email = user.getEmail();
this.name = user.getName();
this.role = user.getRole();
this.mobile = user.getMobile();
this.wechatid = user.getWechatid();
this.location = user.getLocation();
} |
public java.awt.Image getImageFromPath(java.lang.String path) {
java.awt.Image result = tcg_auto.hci.HCI.images.get(path);
if (result == null) {
java.lang.System.out.println(("getting image " + path));
getClass();
try {
result = javax.imageio.ImageIO.read(tcg_auto.utils.HCIUt... | public java.awt.Image getImageFromPath(java.lang.String path) {
java.awt.Image result = tcg_auto.hci.HCI.images.get(path);
if (result == null) {
getClass();
try {
result = javax.imageio.ImageIO.read(tcg_auto.utils.HCIUtils.getUrlFromPath(path));
tcg_auto.hci.HCI.images.pu... |
public void handle(long now) {
if ((t) < span) {
pane.getChildren().retainAll(inf, target);
for (ConfusedRockets.Rocket r : swarm.getRocketStore()) {
r.update(count);
r.draw(pane);
}
(t)++;
(count)++;
}else {
swarm.breed(0.01, targetPos);
... | public void handle(long now) {
if ((t) < span) {
pane.getChildren().retainAll(inf, target);
for (ConfusedRockets.Rocket r : swarm.getRocketStore()) {
r.update(t);
r.draw(pane);
}
(t)++;
}else {
swarm.breed(0.01, targetPos);
inf.setText(java... |
public void onPause() {
super.onPause();
operatingAnim.cancel();
eye_left_Anim.cancel();
eye_right_Anim.cancel();
operatingAnim.reset();
eye_left_Anim.reset();
eye_right_Anim.reset();
mouse.clearAnimation();
eye_left.clearAnimation();
eye_right.clearAnimation();
eyelid_left.s... | public void onPause() {
super.onPause();
operatingAnim.reset();
eye_left_Anim.reset();
eye_right_Anim.reset();
mouse.clearAnimation();
eye_left.clearAnimation();
eye_right.clearAnimation();
eyelid_left.stopLoading();
eyelid_right.stopLoading();
mGraduallyTextView.stopLoading();
} |
public void onScrolled(android.support.v7.widget.RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
android.util.Log.d("myr", ("height:" + dy));
if (dy > (com.example.hmyd.mytestandroid_studio.tools.Utils.SCREEN_HEIGHT)) {
back_top.setVisibility(View.VISIBLE);
}... | public void onScrolled(android.support.v7.widget.RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
if (dy > (com.example.hmyd.mytestandroid_studio.tools.Utils.SCREEN_HEIGHT)) {
back_top.setVisibility(View.VISIBLE);
}else {
back_top.setVisibility(View.INVISI... |
public void draw(view.renderer.MountainsTile mountainsTile) {
this.riverImg = determineCorrectRiverImage(mountainsTile.getNodeRepresentationRiverString(), mountainsTile.getNodeRepresentationRotation());
boardPanel.drawTile(model.utilities.ConversionUtilities.convertFromCubeToPoint(mountainsTile.getLocation()), ... | public void draw(view.renderer.MountainsTile mountainsTile) {
this.riverImg = determineCorrectRiverImage(mountainsTile.getNodeRepresentationRiverString(), mountainsTile.getNodeRepresentationRotation());
boardPanel.drawTile(model.utilities.ConversionUtilities.convertFromCubeToPoint(mountainsTile.getLocation()), ... |
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.Exception {
log.debug("Smart Cosmos Security enabled, all requests must be authorized and no login redirect is offered.");
http.exceptionHandling().accessDeniedHandler(new net.smartcosmos.sec... | public void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.Exception {
log.debug("Smart Cosmos Security enabled, all requests must be authorized and no login redirect is offered.");
http.exceptionHandling().accessDeniedHandler(new net.smartcosmos.securi... |
public <T> T getStatistic(java.lang.String statisticName, java.lang.Class<T> clazz) {
if (((statisticName == null) || (statisticName.trim().equals(""))) || ((stats.get(statisticName)) == null)) {
return null;
}
return clazz.cast(stats.get(statisticName));
} | public <T> T getStatistic(java.lang.String statisticName, java.lang.Class<T> clazz) {
if (((statisticName == null) || ("".equals(statisticName))) || ((stats.get(statisticName)) == null)) {
return null;
}
return clazz.cast(stats.get(statisticName));
} |
public void onClick(android.view.View view) {
com.zai.nomwell.util.Util.log(com.zai.nomwell.fragments.MySpotFragment.TAG, "Clicked");
switch (view.getId()) {
case R.id.llShare :
break;
case R.id.llAddSpots :
if ((rcvwSpots.getAdapter().getItemCount()) > 0) {
... | public void onClick(android.view.View view) {
com.zai.nomwell.util.Util.log(com.zai.nomwell.fragments.MySpotFragment.TAG, "Clicked");
switch (view.getId()) {
case R.id.llShare :
break;
case R.id.llAddSpots :
if (((rcvwSpots) != null) && ((rcvwSpots.getAdapter().getItemCou... |
public void testParamsInLetSubquery() {
java.util.Map<java.lang.String, java.lang.Object> params = new java.util.HashMap<java.lang.String, java.lang.Object>();
params.put("name", "foo");
java.util.List<com.orientechnologies.orient.core.record.impl.ODocument> qResult = db.command(new com.orientechnologies.or... | public void testParamsInLetSubquery() {
java.util.Map<java.lang.String, java.lang.Object> params = new java.util.HashMap<java.lang.String, java.lang.Object>();
params.put("name", "foo");
java.util.List<com.orientechnologies.orient.core.record.impl.ODocument> qResult = db.command(new com.orientechnologies.or... |
public void onCreate() {
super.onCreate();
if ((player) == null) {
player = android.media.MediaPlayer.create(this, R.raw.song);
player.setOnCompletionListener(new android.media.MediaPlayer.OnCompletionListener() {
@java.lang.Override
public void onCompletion(android.media... | public void onCreate() {
super.onCreate();
if ((player) == null) {
player = android.media.MediaPlayer.create(this, R.raw.song);
player.setOnCompletionListener(new android.media.MediaPlayer.OnCompletionListener() {
@java.lang.Override
public void onCompletion(android.media... |
public void enableDevice() {
try {
printer.setDeviceEnabled(true);
java.lang.String[] lines = new java.lang.String[1];
printer.getData(FPTR_GD_PRINTER_ID, null, lines);
java.lang.System.out.println(("FPTR_GD_PRINTER_ID: " + (lines[0])));
printer.setPOSID("1", "Кравцов В.В.");... | public void enableDevice() {
try {
printer.setDeviceEnabled(true);
java.lang.String[] lines = new java.lang.String[1];
printer.getData(FPTR_GD_PRINTER_ID, null, lines);
java.lang.System.out.println(("FPTR_GD_PRINTER_ID: " + (lines[0])));
printer.setPOSID("1", "Кравцов В.В.");... |
public void onAnimate(int value) {
if ((mHeaderIndicatorLocation) != (com.yat3s.chopin.ChopinLayout.INDICATOR_LOCATION_BACK)) {
mHeaderIndicatorView.translateVerticalWithOffset(value);
}
if (null != (mRefreshHeaderIndicatorProvider)) {
int progress = (100 * value) / (mHeaderIndicatorView.get... | public void onAnimate(int value) {
if ((mHeaderIndicatorLocation) != (com.yat3s.chopin.ChopinLayout.INDICATOR_LOCATION_BACK)) {
mHeaderIndicatorView.translateVerticalWithOffset(value);
}
if (null != (mRefreshHeaderIndicatorProvider)) {
int progress = (100 * (java.lang.Math.abs(value))) / (mH... |
public void setLang(org.sefaria.sefaria.Util.Lang lang) {
if (lang == (Util.Lang.HE)) {
tv.setText(enTitle);
tv.setTypeface(org.sefaria.sefaria.MyApp.getFont(MyApp.TAAMEY_FRANK_FONT));
}else {
tv.setText(heTitle);
tv.setTypeface(org.sefaria.sefaria.MyApp.getFont(MyApp.TAAMEY_FRAN... | public void setLang(org.sefaria.sefaria.Util.Lang lang) {
if (lang == (Util.Lang.HE)) {
tv.setText(heTitle);
tv.setTypeface(org.sefaria.sefaria.MyApp.getFont(MyApp.TAAMEY_FRANK_FONT));
}else {
tv.setText(enTitle);
tv.setTypeface(org.sefaria.sefaria.MyApp.getFont(MyApp.TAAMEY_FRAN... |
public boolean equals(T o1, T o2) {
if ((o1 == null) && (o2 == null))
return true;
if ((o1 == null) || (o2 == null))
return false;
boolean equal = true;
for (java.util.function.Function f : functions)
equal = equal & (f.apply(o1).equals(f.apply(o2)));
return fa... | public boolean equals(T o1, T o2) {
if ((o1 == null) && (o2 == null))
return true;
if ((o1 == null) || (o2 == null))
return false;
boolean equal = true;
for (java.util.function.Function f : functions)
equal = equal & (f.apply(o1).equals(f.apply(o2)));
return eq... |
public static void calcCross() {
int a = 2;
int b = 7;
int c = 8;
int d = 9;
int e = 14;
java.util.List<java.lang.Integer> figure = java.util.Arrays.asList(a, b, c, d, e);
de.sebhn.algorithm.excersise5.DLXNodeOld.calculateFiguresPosition(figure, 3);
} | public static void calcCross() {
int a = 2;
int b = 7;
int c = 8;
int d = 9;
int e = 14;
if ((de.sebhn.algorithm.excersise5.DLXNodeOld.n) > 2) {
java.util.List<java.lang.Integer> figure = java.util.Arrays.asList(a, b, c, d, e);
de.sebhn.algorithm.excersise5.DLXNodeOld.calculateFi... |
protected java.lang.String random() {
java.lang.String s = new java.math.BigInteger(((length) * 5), random).toString(36);
if ((s.length()) > (length)) {
return s.substring(0, s.length());
}
return s;
} | protected java.lang.String random() {
java.lang.String s = new java.math.BigInteger(((length) * 5), random).toString(36);
if ((s.length()) > (length)) {
return s.substring(0, length);
}
return s;
} |
public void registerLibrary() {
Library lib = new LibraryImpl("Birkbeck");
u.register(lib);
assertEquals(u.getLibrary(), lib);
assertEquals(u.getId(), 0);
r.register(lib);
assertEquals(r.getLibrary(), lib);
assertEquals(r.getId(), 1);
} | public void registerLibrary() {
Library lib = new LibraryImpl("Birkbeck");
u.register(lib);
assertEquals(u.getLibrary(), "Birkbeck");
assertEquals(u.getId(), 0);
r.register(lib);
assertEquals(r.getLibrary(), "Birkbeck");
assertEquals(r.getId(), 1);
} |
public void addNumberOfFish(models.Fish typeOfFish, long numberOfFish) {
if (this.fishes.contains(typeOfFish)) {
this.getFishCount(typeOfFish).addCount(numberOfFish);
this.getFishCount(typeOfFish).save();
}else {
this.fishes.add(typeOfFish);
this.fishCounts.add(new models.FishCou... | public void addNumberOfFish(models.Fish typeOfFish, long numberOfFish) {
if (this.fishes.contains(typeOfFish)) {
this.getFishCount(typeOfFish).addCount(numberOfFish);
}else {
this.fishes.add(typeOfFish);
this.fishCounts.add(new models.FishCount(this, typeOfFish.getId(), numberOfFish));
... |
public void testReplaceNotExistingFunction() throws java.lang.Exception {
io.crate.operation.udf.UserDefinedFunctionsMetaData metaData = io.crate.operation.udf.UserDefinedFunctionService.putFunction(io.crate.operation.udf.UserDefinedFunctionsMetaData.of(same1), different, true);
assertThat(metaData.functionsMet... | public void testReplaceNotExistingFunction() throws java.lang.Exception {
io.crate.operation.udf.UserDefinedFunctionsMetaData metaData = putFunction(io.crate.operation.udf.UserDefinedFunctionsMetaData.of(same1), different, true);
assertThat(metaData.functionsMetaData(), hasSize(2));
assertThat(metaData.func... |
private static void getTitleAuthorSubject(com.adobe.xmp.impl.VeraPDFMeta metadata, java.util.Map<java.lang.String, java.lang.Object> properties) throws com.adobe.xmp.XMPException {
org.verapdf.model.tools.XMPChecker.putProperty(properties, org.verapdf.model.tools.XMPChecker.TITLE, metadata.getTitle());
org.vera... | private static void getTitleAuthorSubject(com.adobe.xmp.impl.VeraPDFMeta metadata, java.util.Map<java.lang.String, java.lang.Object> properties) throws com.adobe.xmp.XMPException {
org.verapdf.model.tools.XMPChecker.putProperty(properties, org.verapdf.model.tools.XMPChecker.TITLE, metadata.getTitle());
org.vera... |
protected static int __offset(int vtable_offset, int offset, java.nio.ByteBuffer bb) {
int vtable = (bb.array().length) - offset;
return (bb.getShort(((vtable + vtable_offset) - (bb.getInt(vtable))))) + vtable;
} | protected static int __offset(int vtable_offset, int offset, java.nio.ByteBuffer bb) {
int vtable = (bb.array().length) - offset;
return (bb.getShort(((vtable + vtable_offset) - (bb.getShort(vtable))))) != 0 ? (bb.getShort(((vtable + vtable_offset) - (bb.getShort(vtable))))) + vtable : 0;
} |
private ItemTouchHelper.Callback createHelperCallback() {
return new android.support.v7.widget.helper.ItemTouchHelper.SimpleCallback(((android.support.v7.widget.helper.ItemTouchHelper.UP) | (android.support.v7.widget.helper.ItemTouchHelper.DOWN)), ((android.support.v7.widget.helper.ItemTouchHelper.LEFT) | (android.... | private ItemTouchHelper.Callback createHelperCallback() {
return new android.support.v7.widget.helper.ItemTouchHelper.SimpleCallback(((android.support.v7.widget.helper.ItemTouchHelper.UP) | (android.support.v7.widget.helper.ItemTouchHelper.DOWN)), 0) {
@java.lang.Override
public boolean onMove(andro... |
public void onNext(com.example.oromil.newtest.network.Model.Valute valute) {
progressBar.setVisibility(ProgressBar.VISIBLE);
android.util.Log.d("DB_Save", "sucsess response");
converter.getCoursesArray(valute);
db.openDB();
db.clearDB();
insertValues();
android.util.Log.d("DB_Save", "save su... | public void onNext(com.example.oromil.newtest.network.Model.Valute valute) {
android.util.Log.d("DB_Save", "sucsess response");
converter.getCoursesArray(valute);
db.openDB();
db.clearDB();
insertValues();
android.util.Log.d("DB_Save", "save sucsess");
db.closeDB();
showItems();
prog... |
private org.talend.core.model.repository.ERepositoryObjectType getRepositoryType(org.talend.repository.model.IRepositoryNode node) {
org.talend.repository.model.IRepositoryNode testNode = node;
while (testNode != null) {
org.talend.core.model.repository.ERepositoryObjectType repObjType = testNode.getCon... | public org.talend.core.model.repository.ERepositoryObjectType getRepositoryType(org.talend.repository.model.IRepositoryNode node) {
org.talend.repository.model.IRepositoryNode testNode = node;
while (testNode != null) {
org.talend.core.model.repository.ERepositoryObjectType repObjType = testNode.getCont... |
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
javax.servlet.http.HttpSession session = request.getSession();
javax.servlet.ServletContext context = request.getServletContext();
... | protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
javax.servlet.http.HttpSession session = request.getSession();
javax.servlet.ServletContext context = request.getServletContext();
... |
protected void requestData(boolean refresh) {
java.lang.String key = getCacheKey();
if (isReadCacheData(refresh)) {
readCacheData(key);
apollo.tianya.util.TLog.log(TAG, ("requestData cache:" + key));
}else {
sendRequestData();
apollo.tianya.util.TLog.log(TAG, ("requestData ne... | protected void requestData(boolean refresh) {
java.lang.String key = getCacheKey();
if ((!refresh) && (isReadCacheData())) {
readCacheData(key);
apollo.tianya.util.TLog.log(TAG, ("requestData cache:" + key));
}else {
sendRequestData();
apollo.tianya.util.TLog.log(TAG, ("reque... |
private synchronized void setState(org.apache.kafka.streams.processor.internals.StreamThread.State newState) {
org.apache.kafka.streams.processor.internals.StreamThread.State oldState = state;
if (!(state.isValidTransition(newState))) {
throw new java.lang.IllegalStateException(((("Incorrect state trans... | private synchronized void setState(org.apache.kafka.streams.processor.internals.StreamThread.State newState) {
org.apache.kafka.streams.processor.internals.StreamThread.State oldState = state;
if (!(state.isValidTransition(newState))) {
throw new java.lang.IllegalStateException(((("Incorrect state trans... |
public java.lang.String getTargetValidatorNames() {
java.lang.String[] validatorIds = getTargetValidatorIds();
java.lang.String validatorNames = "";
for (java.lang.String validatorId : validatorIds) {
if (com.silverpeas.util.StringUtil.isDefined(validatorNames)) {
validatorNames += ", ";... | public java.lang.String getTargetValidatorNames() {
java.lang.String validatorNames = "";
java.lang.String[] validatorIds = getTargetValidatorIds();
if (validatorIds != null) {
for (java.lang.String validatorId : validatorIds) {
if (com.silverpeas.util.StringUtil.isDefined(validatorNames... |
public java.lang.String toJson(java.util.Set<javax.websocket.Session> objs) throws org.ocelotds.marshalling.exceptions.JsonMarshallingException {
java.lang.StringBuilder result = new java.lang.StringBuilder("[");
boolean first = true;
for (javax.websocket.Session obj : objs) {
if (!first) {
... | public java.lang.String toJson(java.util.Set<javax.websocket.Session> objs) throws org.ocelotds.marshalling.exceptions.JsonMarshallingException {
java.lang.StringBuilder result = new java.lang.StringBuilder("[");
boolean first = true;
for (javax.websocket.Session obj : objs) {
if (!first) {
... |
public static void putInt(android.content.Context context, java.lang.String key, int value, boolean commit) {
ds.framework.v4.Settings.ensurePreferencesEditor(context);
ds.framework.v4.Settings.sPreferencesEditor.putInt(key, value);
if (commit) {
ds.framework.v4.Settings.sPreferencesEditor.commit();... | public static synchronized void putInt(android.content.Context context, java.lang.String key, int value, boolean commit) {
ds.framework.v4.Settings.ensurePreferencesEditor(context);
ds.framework.v4.Settings.sPreferencesEditor.putInt(key, value);
if (commit) {
ds.framework.v4.Settings.sPreferencesEdi... |
public java.lang.String submitJob(final com.netflix.genie.common.dto.JobRequest jobRequest) throws com.netflix.genie.client.exceptions.GenieClientException, java.io.IOException {
if (jobRequest == null) {
throw new java.lang.IllegalArgumentException("Job Request cannot be null.");
}
return getIdFrom... | public java.lang.String submitJob(final com.netflix.genie.common.dto.JobRequest jobRequest) throws com.netflix.genie.client.exceptions.GenieClientException, java.io.IOException {
if (jobRequest == null) {
throw new java.lang.IllegalArgumentException("Job Request cannot be null.");
}
return getIdFrom... |
private boolean isEditibleFileType(java.nio.file.Path f) {
java.nio.file.Path fileName = f.getFileName();
for (java.lang.String ext : org.fao.geonet.services.metadata.format.ListBundleFiles.extensions) {
if (fileName.endsWith(("." + ext)))
return true;
}
return fileName.toSt... | private boolean isEditibleFileType(java.nio.file.Path f) {
java.lang.String fileName = f.getFileName().toString();
for (java.lang.String ext : org.fao.geonet.services.metadata.format.ListBundleFiles.extensions) {
if (fileName.endsWith(("." + ext)))
return true;
}
return file... |
public static void swipeFullLeftAfter(io.appium.java_client.AppiumDriver driver, com.salesforceiq.augmenteddriver.util.AugmentedFunctions<?> augmentedFunctions, org.openqa.selenium.By by, int waitTimeInSeconds) {
com.google.common.base.Preconditions.checkNotNull(by);
com.google.common.base.Preconditions.checkNo... | public static void swipeFullLeftAfter(io.appium.java_client.AppiumDriver driver, com.salesforceiq.augmenteddriver.util.AugmentedFunctions<?> augmentedFunctions, org.openqa.selenium.By by, int waitTimeInSeconds) {
com.google.common.base.Preconditions.checkNotNull(by);
com.google.common.base.Preconditions.checkNo... |
public static char minuscule(char l) {
if ((((int) (l)) <= 90) && (((int) (l)) >= 65)) {
return ((char) (((int) (l)) + 32));
}else
return l;
} | private static char minuscule(char l) {
if ((((int) (l)) <= 90) && (((int) (l)) >= 65)) {
return ((char) (((int) (l)) + 32));
}else
return l;
} |
public static void cancelScheduledNotifications(android.content.Context context) {
android.app.PendingIntent risePendingIntent = net.chokethe.killerdealer.notifications.NotificationUtils.getPendingIntent(context, NotificationPublisher.RISE_NOTIFICATION_ACTION, 0);
android.app.PendingIntent rebuyPendingIntent = ... | public static void cancelScheduledNotifications(android.content.Context context) {
android.app.PendingIntent risePendingIntent = net.chokethe.killerdealer.notifications.NotificationUtils.getPendingIntent(context, NotificationPublisher.RISE_NOTIFICATION_ACTION);
android.app.PendingIntent rebuyPendingIntent = net... |
public void startTimer() {
try {
if (((seconds) > 0) && (!(started))) {
timer = new com.zombies.game.AutoStart.Countdown(seconds);
timer.run();
started = true;
}
} catch (java.lang.Exception e) {
try {
for (org.bukkit.entity.Player pl : gam... | public void startTimer() {
try {
if (!(started)) {
started = true;
(seconds)++;
timer = new com.zombies.game.AutoStart.Countdown(seconds);
timer.run();
}
} catch (java.lang.Exception e) {
try {
for (org.bukkit.entity.Player pl :... |
public void setEmbeddedProfile() throws java.io.IOException, java.lang.InterruptedException {
au.com.rayh.FilePath[] folders = this.resourcesPath.list("**/*.mobileprovision");
if ((folders.length) == 0) {
throw new au.com.rayh.AbortException("Provisioning profile not found");
}
au.com.rayh.FileP... | public boolean setEmbeddedProfile() throws java.io.IOException, java.lang.InterruptedException {
au.com.rayh.FilePath[] folders = this.resourcesPath.list("**/*.mobileprovision");
if ((folders.length) == 0) {
return false;
}
au.com.rayh.FilePath profilePath = folders[0];
profilePath.copyTo(bi... |
public void display() {
java.lang.System.out.println("TestTest");
javax.swing.JEditorPane jep = new javax.swing.JEditorPane();
jep.setEditable(false);
javax.swing.JScrollPane scrollPane = new javax.swing.JScrollPane(jep);
javax.swing.JFrame f = new javax.swing.JFrame();
f.setDefaultCloseOperatio... | public void display() {
javax.swing.JEditorPane jep = new javax.swing.JEditorPane();
jep.setEditable(false);
javax.swing.JScrollPane scrollPane = new javax.swing.JScrollPane(jep);
javax.swing.JFrame f = new javax.swing.JFrame();
f.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
f.get... |
public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, org.json.JSONObject response) {
mActivity.showLoading(false);
android.util.Log.d("minh", ("GET_CUSTOMERS_URL: " + response));
if (com.app.restfulapp.ultis.Parser.isSuccess(response)) {
mAdapCus.setData(com.app.rest... | public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, org.json.JSONObject response) {
android.util.Log.d("minh", ("GET_CUSTOMERS_URL: " + response));
if (com.app.restfulapp.ultis.Parser.isSuccess(response)) {
mAdapCus.setData(com.app.restfulapp.ultis.Parser.parseCustomers... |
public void should_fail_when_range_does_not_contain_expected_values() {
final com.google.common.collect.Range<java.lang.Integer> actual = com.google.common.collect.Range.closedOpen(1, 10);
expectException(java.lang.AssertionError.class, java.lang.String.format(("%nExpecting:%n" + ((((" <[1‥10)>%n" + "to contain... | public void should_fail_when_range_does_not_contain_expected_values() {
final com.google.common.collect.Range<java.lang.Integer> actual = com.google.common.collect.Range.closedOpen(1, 10);
expectException(java.lang.AssertionError.class, ("%nExpecting:%n" + ((((" <[1‥10)>%n" + "to contain:%n") + " <[1, 2, 3, 4, ... |
public void play(java.lang.String track, boolean playedFromPlaylist) {
try {
shudder.model.Track t = new com.google.gson.Gson().fromJson(track, shudder.model.Track.class);
control.open(new java.io.File(t.getPath()));
control.play();
currentSong = t;
java.lang.System.out.print... | public void play(java.lang.String track, boolean playedFromPlaylist) {
try {
shudder.model.Track t = new com.google.gson.Gson().fromJson(track, shudder.model.Track.class);
control.open(new java.io.File(t.getPath()));
control.play();
currentSong = t;
if (playedFromPlaylist) {
... |
private boolean checkForResultSet(java.sql.ResultSet resultSet, java.sql.Connection connection, java.sql.PreparedStatement watchedCheckStatement) {
try {
if (!(resultSet.next())) {
closeAll(connection, watchedCheckStatement);
return false;
}
} catch (java.sql.SQLException... | private boolean checkForResultSet(java.sql.ResultSet resultSet, java.sql.Connection connection, java.sql.PreparedStatement watchedCheckStatement) {
try {
if (!(resultSet.next())) {
closeAll(false, connection, watchedCheckStatement);
return false;
}
} catch (java.sql.SQLEx... |
private void execute() {
dummyEso = new test.DummyESOWithEmptyMethod();
dummyEso.exec();
java.lang.Thread t1 = new java.lang.Thread(new test.UnsyncTest.Job1());
t1.start();
dummyEso.exec();
try {
t1.join();
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
... | public void execute() {
dummyEso = new test.DummyESOWithEmptyMethod();
dummyEso.exec();
java.lang.Thread t1 = new java.lang.Thread(new test.UnsyncTest.Job1());
t1.start();
dummyEso.exec();
try {
t1.join();
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.