buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private static boolean isSorted(java.lang.Comparable[] a, int lo, int hi) {
for (int i = lo; i < hi; i++) {
if (!(QuickSort3way.less(a[i], a[(i + 1)])))
return false;
}
return true;
} | private static boolean isSorted(java.lang.Comparable[] a, int lo, int hi) {
for (int i = lo; i < hi; i++) {
if (QuickSort3way.less(a[(i + 1)], a[i]))
return false;
}
return true;
} |
public int compare(nl.mpcjanssen.simpletask.task.Task a, nl.mpcjanssen.simpletask.task.Task b) {
if (a == null)
return 1;
if (b == null)
return -1;
int completeA = (a.isCompleted()) ? 1 : 0;
int completeB = (b.isCompleted()) ? 1 : 0;
return completeA - completeB;
} | public int compare(nl.mpcjanssen.simpletask.task.Task a, nl.mpcjanssen.simpletask.task.Task b) {
if ((a == null) && (b == null))
return 0;
if (a == null)
return 1;
if (b == null)
return -1;
int completeA = (a.isCompleted()) ? 1 : 0;
int completeB = (b.isComplet... |
public void processAttributes(android.content.res.TypedArray arr) {
if (arr == null)
return ;
if (arr.hasValue(R.styleable.TitleSpinner_digits)) {
setDigits(arr.getInt(R.styleable.TitleSpinner_digits, digits));
}
if (arr.hasValue(R.styleable.TitleSpinner_min_val)) {
minValue... | private void processAttributes(android.content.res.TypedArray arr) {
if (arr == null)
return ;
if (arr.hasValue(R.styleable.TitleSpinner_digits)) {
setDigits(arr.getInt(R.styleable.TitleSpinner_digits, digits));
}
if (arr.hasValue(R.styleable.TitleSpinner_min_val)) {
minValu... |
static int birthdayCakeCandles(int n, int[] ar) {
int max = ar[0];
int result = 0;
for (int i = 0; i < n; i++) {
if ((ar[i]) > max) {
max = ar[i];
}
}
for (int j = 0; j < n; j++) {
if ((ar[j]) < max) {
result++;
}
}
return result;
} | static int birthdayCakeCandles(int n, int[] ar) {
int max = ar[0];
int result = 0;
for (int i = 0; i < n; i++) {
if ((ar[i]) > max) {
max = ar[i];
}
}
for (int j = 0; j < n; j++) {
if ((ar[j]) == max) {
result++;
}
}
return result;
} |
public static void checkRowSpecification(java.lang.String rowSpecification) throws org.mm.exceptions.MappingMasterException {
if (rowSpecification.equals(""))
throw new org.mm.exceptions.MappingMasterException("empty row specification");
if (!(rowSpecification.equals(MappingExpression.FinishRowOrCo... | public static void checkRowSpecification(java.lang.String rowSpecification) throws org.mm.exceptions.MappingMasterException {
if ((rowSpecification.length()) == 0)
throw new org.mm.exceptions.MappingMasterException("empty row specification");
if (!(rowSpecification.equals(MappingExpression.FinishRo... |
public void showPageLoadingStatus(final com.okandroid.boot.widget.PageDataAdapter.PageLoadingStatus pageLoadingStatus, final com.okandroid.boot.widget.PageDataAdapter.ExtraPageLoadingStatusCallback callback) {
getRecyclerView().postOnAnimation(new java.lang.Runnable() {
@java.lang.Override
public vo... | public void showPageLoadingStatus(final com.okandroid.boot.widget.PageDataAdapter.PageLoadingStatus pageLoadingStatus, final com.okandroid.boot.widget.PageDataAdapter.ExtraPageLoadingStatusCallback callback) {
getRecyclerView().postOnAnimation(new java.lang.Runnable() {
@java.lang.Override
public vo... |
public com.codepath.apps.restclienttemplate.helpers.TweetAdapter.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
context = ((android.support.v7.app.AppCompatActivity) (parent.getContext()));
android.view.LayoutInflater inflater = android.view.LayoutInflater.from(context);
androi... | public com.codepath.apps.restclienttemplate.helpers.TweetAdapter.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
context = ((android.support.v7.app.AppCompatActivity) (parent.getContext()));
android.view.LayoutInflater inflater = android.view.LayoutInflater.from(context);
androi... |
public void resolveTypesGenerate(dyvil.tools.parsing.marker.MarkerList markers, dyvil.tools.compiler.ast.context.IContext context) {
final dyvil.tools.compiler.ast.classes.ClassBody body = this.theClass.getBody();
final dyvil.tools.compiler.ast.type.IType classType = this.theClass.getClassType();
final dyvi... | public void resolveTypesGenerate(dyvil.tools.parsing.marker.MarkerList markers, dyvil.tools.compiler.ast.context.IContext context) {
final dyvil.tools.compiler.ast.classes.ClassBody body = this.theClass.getBody();
final dyvil.tools.compiler.ast.type.IType classType = this.theClass.getClassType();
final dyvi... |
public java.util.ArrayList<java.lang.String> checkSearchString(java.lang.CharSequence s) {
searchInput = s.toString();
android.util.Log.d("before check", java.lang.String.valueOf(tempArray));
for (int i = 0; i < (medicines.length); i++) {
medicineName = medicines[i][0].toString();
if (medici... | public java.util.ArrayList<java.lang.String> checkSearchString(java.lang.CharSequence s) {
searchInput = s.toString();
for (int i = 0; i < (medicines.length); i++) {
medicineName = medicines[i][0].toString();
if (medicineName.toLowerCase().startsWith(searchInput.toLowerCase())) {
tem... |
public Model.MinionImpl chooseTarget(java.util.ArrayList<Model.MinionImpl> enemies) {
Model.MinionImpl target = new Model.MinionImpl();
double minDist = 9999999;
for (Model.MinionImpl warrior : enemies) {
double dist = cal_distance(warrior);
if ((dist < minDist) && (dist < (atkRange))) {
... | public Model.MinionImpl chooseTarget(java.util.ArrayList<Model.MinionImpl> enemies) {
Model.MinionImpl target = new Model.MinionImpl();
double minDist = 9999999;
for (Model.MinionImpl warrior : enemies) {
double dist = cal_distance(warrior);
if (dist < minDist) {
minDist = dist;
... |
public void setListSavedArticle(java.util.List<com.jds.webapp.DataArticle> newList) {
newList = new java.util.ArrayList<com.jds.webapp.DataArticle>();
_sharedPrefEditor.putInt("Status_size", newList.size());
for (int i = 0; i < (newList.size()); i++) {
com.google.gson.Gson gson = new com.google.gson... | public void setListSavedArticle(java.util.List<com.jds.webapp.DataArticle> newList) {
_sharedPrefEditor.putInt("Status_size", newList.size());
for (int i = 0; i < (newList.size()); i++) {
com.google.gson.Gson gson = new com.google.gson.Gson();
java.lang.String dataJson = gson.toJson(newList.get(... |
public void testHeaderFrameWithPadding() throws java.lang.Exception {
http2Connect();
byte[] padding = new byte[8];
sendSimpleGetRequest(3, padding);
readSimpleGetResponse();
org.junit.Assert.assertEquals(getSimpleResponseTrace(3), output.getTrace());
output.clearTrace();
} | public void testHeaderFrameWithPadding() throws java.lang.Exception {
http2Connect();
byte[] padding = new byte[8];
sendSimpleGetRequest(3, padding);
readSimpleGetResponse();
org.junit.Assert.assertEquals(getSimpleResponseTrace(3), output.getTrace());
} |
public void update(java.util.Observable o, java.lang.Object arg) {
if (arg instanceof java.lang.String) {
java.lang.String message = ((java.lang.String) (arg));
if ((message.toString()) == "Restore") {
me.addView(dragSpot);
}
}else {
me.addView(dragSpot);
}
} | public void update(java.util.Observable o, java.lang.Object arg) {
if (arg instanceof java.lang.String) {
java.lang.String message = ((java.lang.String) (arg));
if ("Restore".equals(message.toString())) {
me.addView(dragSpot);
}
}else {
me.addView(dragSpot);
}
} |
private int[] getDate(int fastForward) {
int newDay = (currDay) + fastForward;
int newMonth = currMonth;
int newYear = currYear;
if (newDay > (daysInMonth[currMonth])) {
newDay = newDay - (daysInMonth[currMonth]);
newMonth = newMonth + 1;
}
if (newMonth > 12) {
newMonth =... | private int[] getDate(int fastForward) {
int newDay = (currDay) + fastForward;
int newMonth = currMonth;
int newYear = currYear;
while (newDay > (daysInMonth[newMonth])) {
newDay -= daysInMonth[newMonth];
newMonth += 1;
}
if (newMonth > 12) {
newMonth = 1;
newYea... |
public void onResume() {
super.onResume();
if ((((rustelefonen.no.drikkevett_android.MainActivity) (getActivity())).getCurrentViewpagerPosition()) == 2) {
((rustelefonen.no.drikkevett_android.MainActivity) (getActivity())).getFloatingActionMenu().showMenu(true);
}
setUserData();
status = isS... | public void onResume() {
super.onResume();
if ((((rustelefonen.no.drikkevett_android.MainActivity) (getActivity())).getCurrentViewpagerPosition()) == 2) {
((rustelefonen.no.drikkevett_android.MainActivity) (getActivity())).getFloatingActionMenu().showMenu(true);
}
setUserData();
status = isS... |
public static double localEstimation(int[] scores, double ABbranch) {
double d = (ABbranch * ((double) (scores[2]))) / ((double) ((scores[0]) + (scores[1])));
return d;
} | public static double localEstimation(int[] scores, double ABbranch) {
if (((scores[0]) + (scores[1])) == 0) {
return 0.0;
}
double d = (ABbranch * ((double) (scores[2]))) / ((double) ((scores[0]) + (scores[1])));
return d;
} |
public static java.lang.String encrypt(java.lang.String plainText, javax.crypto.SecretKey secretKey) throws java.lang.Exception {
byte[] plainTextByte = plainText.getBytes();
in.tn.mobilepay.util.EncryptionDecryptionAES.cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, secretKey);
byte[] encryptedByte = in.tn.m... | public static java.lang.String encrypt(java.lang.String plainText, javax.crypto.SecretKey secretKey) throws java.lang.Exception {
byte[] plainTextByte = plainText.getBytes();
in.tn.mobilepay.util.EncryptionDecryptionAES.cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, secretKey);
byte[] encryptedByte = in.tn.m... |
public void testEspresso() {
android.support.test.espresso.ViewInteraction interaction = android.support.test.espresso.Espresso.onView(org.hamcrest.CoreMatchers.allOf(withId(R.id.editText), withText("this is a test"), hasFocus()));
interaction.perform(android.support.test.espresso.action.ViewActions.replaceText... | public void testEspresso() {
android.support.test.espresso.ViewInteraction interaction = android.support.test.espresso.Espresso.onView(org.hamcrest.CoreMatchers.allOf(withId(R.id.editText), withText("this is a test"), hasFocus()));
interaction.perform(android.support.test.espresso.action.ViewActions.replaceText... |
private void deleteStudent(int id) {
com.studios.lucian.students.model.Student student = mStudentsList.get(id);
if (mStudentsDbHandler.deleteStudent(student)) {
mGroupDao.decreaseCount(mCurrentGroup);
((com.studios.lucian.students.activity.MainActivity) (getActivity())).getMainFragment().syncGro... | private void deleteStudent(int id) {
com.studios.lucian.students.model.Student student = mStudentsList.get(id);
if (mStudentsDbHandler.deleteStudent(student)) {
mGroupDao.decreaseCount(mCurrentGroup);
((com.studios.lucian.students.activity.MainActivity) (getActivity())).getMainFragment().syncGro... |
public void setDateTest() {
soccerLeaguePD.Game game = new soccerLeaguePD.Game();
utility.SimpleDate date = new utility.SimpleDate("08/01/2016");
game.setDate(date);
utility.SimpleDate date1 = game.getDate();
org.junit.Assert.assertTrue("Date is not the same", date1.equals(date));
} | public void setDateTest() {
soccerLeaguePD.Game game = new soccerLeaguePD.Game();
java.util.Date date = new java.util.Date();
game.setDate(date);
java.util.Date date1 = game.getDate();
org.junit.Assert.assertTrue("Date is not the same", date1.equals(date));
} |
private java.util.Set<org.seekay.contract.model.domain.Contract> matchByHeaders(org.seekay.contract.model.domain.ContractRequest contractRequest) {
java.util.Set<org.seekay.contract.model.domain.Contract> matches = headerMatcher.isMatch(contractService.readEnabled(), contractRequest.getHeaders());
log.debug("Ma... | private java.util.Set<org.seekay.contract.model.domain.Contract> matchByHeaders(org.seekay.contract.model.domain.ContractRequest contractRequest) {
java.util.Set<org.seekay.contract.model.domain.Contract> matches = headerMatcher.isMatch(contractService.readEnabled(), contractRequest.getHeaders());
log.info("Mat... |
public void startThread() {
t.setName("T");
t.start();
modifier = getClass().getSimpleName();
SpMap.checkThread();
try {
t.join();
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
java.lang.System.out.println(("Last Modifier is " + (modifier)));
} | public void startThread() {
t.setName("T");
t.start();
modifier = getClass().getSimpleName();
SpMap.checkThread(1);
try {
t.join();
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
java.lang.System.out.println(("Last Modifier is " + (modifier)));
} |
public void onClick(android.view.View view) {
if ((view.getId()) == (mDriverButton.getId())) {
android.content.Intent driverIntent = new android.content.Intent(this, com.tsevans.dddispatcher.Controllers.Activities.DriverActivities.DriverSetupActivity.class);
startActivity(driverIntent);
fini... | public void onClick(android.view.View view) {
if ((view.getId()) == (mDriverButton.getId())) {
android.content.Intent driverIntent = new android.content.Intent(this, com.tsevans.dddispatcher.Controllers.Activities.DriverActivities.DriverSetupActivity.class);
startActivity(driverIntent);
}else
... |
public void onHide(android.os.Parcelable parcelable) {
if (!(isAdded()))
return ;
org.wordpress.android.ui.comments.CommentActions.moderateCommentForNote(note, newStatus, new org.wordpress.android.ui.comments.CommentActions.CommentActionListener() {
@java.lang.Override
public void o... | public void onHide(android.os.Parcelable parcelable) {
org.wordpress.android.ui.comments.CommentActions.moderateCommentForNote(note, newStatus, new org.wordpress.android.ui.comments.CommentActions.CommentActionListener() {
@java.lang.Override
public void onActionResult(boolean succeeded) {
... |
public hdfs.jsr203.IAttributeReader getView(hdfs.jsr203.HadoopPath path, java.lang.String type) {
if (type == null)
throw new java.lang.NullPointerException();
if (type.equals("basic"))
return new hdfs.jsr203.HadoopBasicFileAttributeView(path, false);
if (type.equals("hadoop"))
... | public hdfs.jsr203.IAttributeReader getView(hdfs.jsr203.HadoopPath path, java.lang.String type) {
if ("basic".equals(type))
return new hdfs.jsr203.HadoopBasicFileAttributeView(path, false);
if ("hadoop".equals(type))
return new hdfs.jsr203.HadoopBasicFileAttributeView(path, true);
... |
public void setSelectedItem(java.lang.Object object) {
super.setSelectedItem(object);
selectedBatchResultEntry = ((batch.BatchResultEntry) (getSelectedItem()));
if ((selectedBatchResultEntry.getCa()) != null) {
fillAssignmentTypeList(selectedBatchResultEntry.getCa()[0].getAssignmentTypes());
... | public void setSelectedItem(java.lang.Object object) {
super.setSelectedItem(object);
selectedBatchResultEntry = ((batch.BatchResultEntry) (getSelectedItem()));
if ((selectedBatchResultEntry.getCa()[0]) != null) {
fillAssignmentTypeList(selectedBatchResultEntry.getCa()[0].getAssignmentTypes());
... |
public java.lang.String convertTime(java.lang.String time) {
java.lang.String ampm = time.substring(((time.length()) - 2), time.length());
time = time.substring(0, ((time.length()) - 2));
int t = java.lang.Integer.parseInt(time);
if (ampm.equals("pm")) {
t += 12;
}
return java.lang.Integ... | public java.lang.String convertTime(java.lang.String time) {
java.lang.String ampm = time.substring(((time.length()) - 2), time.length());
time = time.substring(0, ((time.length()) - 2));
int t = java.lang.Integer.parseInt(time);
if (ampm.equals("pm")) {
t += 12;
}else
if (t == 12) {... |
protected void receiveMessage(java.lang.String user, java.lang.String newMessage, int verifier) {
java.lang.System.out.println(("Received : " + newMessage));
if (verifier == (me.shaaheen.shawtyandshady.MainActivity.counter)) {
me.shaaheen.shawtyandshady.MainActivity.messageDisplay.setText((((((me.shaahe... | protected void receiveMessage(java.lang.String user, java.lang.String newMessage) {
java.lang.System.out.println(("Received : " + newMessage));
me.shaaheen.shawtyandshady.MainActivity.messageDisplay.setText((((((me.shaaheen.shawtyandshady.MainActivity.messageDisplay.getText().toString()) + user) + " > ") + newM... |
public boolean isSuper(javassist.CtBehavior behavior, int pos) {
javassist.bytecode.CodeIterator codeIter = behavior.getMethodInfo().getCodeAttribute().iterator();
java.lang.String s = getClassName(codeIter, pos);
return ((codeIter.byteAt(pos)) == (javassist.bytecode.Opcode.INVOKESPECIAL)) && (!(behavior.ge... | public boolean isSuper(javassist.CtBehavior behavior, int pos) {
javassist.bytecode.CodeIterator codeIter = behavior.getMethodInfo().getCodeAttribute().iterator();
return ((codeIter.byteAt(pos)) == (javassist.bytecode.Opcode.INVOKESPECIAL)) && (!(behavior.getDeclaringClass().getName().equals(getClassName(codeIt... |
public static void main(java.lang.String[] args) {
java.lang.System.out.println("Bag Pandekager-app\n");
Main.initialInfo();
Main.cookPancakes();
java.util.Scanner scanner = new java.util.Scanner(java.lang.System.in);
java.lang.String input = scanner.nextLine();
java.lang.System.out.println("Er ... | public static void main(java.lang.String[] args) {
java.lang.System.out.println("Bag Pandekager-app\n");
Main.initialInfo();
Main.cookPancakes();
java.lang.System.out.println("Er du meget sulten (j/n)?");
java.util.Scanner scanner = new java.util.Scanner(java.lang.System.in);
java.lang.String in... |
private static void clearNullProp(java.util.List<com.github.me10zyl.entity.ClassProperty> list) {
java.util.List<com.github.me10zyl.entity.ClassProperty> deleting = new java.util.ArrayList<>();
for (com.github.me10zyl.entity.ClassProperty c : list) {
if (c.isPlaceHolder()) {
deleting.add(c);... | public static void clearNullProp(java.util.List<com.github.me10zyl.entity.ClassProperty> list) {
java.util.List<com.github.me10zyl.entity.ClassProperty> deleting = new java.util.ArrayList<>();
for (com.github.me10zyl.entity.ClassProperty c : list) {
if (c.isPlaceHolder()) {
deleting.add(c);
... |
public static io.jenkins.blueocean.rest.impl.pipeline.BranchImpl.PullRequest get(final hudson.model.Job job) {
try {
return Caches.PULL_REQUEST_METADATA.get(job.getFullName()).orNull();
} catch (java.util.concurrent.ExecutionException e) {
throw new io.jenkins.blueocean.commons.ServiceException.... | public static io.jenkins.blueocean.rest.impl.pipeline.BranchImpl.PullRequest get(final hudson.model.Job job) {
try {
return Caches.PULL_REQUEST_METADATA.get(job.getFullName());
} catch (java.util.concurrent.ExecutionException e) {
throw new io.jenkins.blueocean.commons.ServiceException.Unexpecte... |
protected boolean checkIndicatorDrawable(int index) {
if (((seekBarElementList) == null) || ((seekBarElementList.size()) < 1))
return false;
hu.mesys.snappingseekbar.library.models.SeekbarElement element = seekBarElementList.get(index);
indicatorDrawableId = element.getIndicatorDrawableId();
... | protected boolean checkIndicatorDrawable(int index) {
if (((seekBarElementList) == null) || ((seekBarElementList.size()) < 1))
return false;
hu.mesys.snappingseekbar.library.models.SeekbarElement element = seekBarElementList.get(index);
indicatorDrawableId = element.getIndicatorDrawableId();
... |
public static final int readIntLittleEndian(byte[] array, int pos) {
return (((((array[(pos + 3)]) & 255) << 24) | (((array[(pos + 2)]) & 255) << 16)) | (((array[(pos + 1)]) & 255) << 8)) | ((array[pos]) & 255);
} | public static final int readIntLittleEndian(byte[] array, int pos) {
pos += 3;
int temp = array[pos];
temp <<= 8;
temp |= (array[(--pos)]) & 255;
temp <<= 8;
temp |= (array[(--pos)]) & 255;
temp <<= 8;
temp |= (array[(--pos)]) & 255;
return temp;
} |
private jnibwapi.Unit[] getZealots() {
java.util.ArrayList zealots = new java.util.ArrayList();
for (jnibwapi.Unit unit : idleUnits()) {
if ((unit.getType()) == (jnibwapi.types.UnitType.UnitTypes.Protoss_Zealot)) {
zealots.add(unit);
}
}
return zealots.toArray();
} | private jnibwapi.Unit[] getZealots() {
java.util.ArrayList<jnibwapi.Unit> zealots = new java.util.ArrayList<jnibwapi.Unit>();
for (jnibwapi.Unit unit : idleUnits()) {
if ((unit.getType()) == (jnibwapi.types.UnitType.UnitTypes.Protoss_Zealot)) {
zealots.add(unit);
}
}
return z... |
public void addQuestion(pt.uc.dei.aor.project.business.model.IScript script, java.lang.String questionText, java.lang.String questionType, java.util.List<java.lang.String> options) throws pt.uc.dei.aor.project.business.exception.IllegalAnswerOptionsException, pt.uc.dei.aor.project.business.exception.IllegalQuestionType... | public void addQuestion(pt.uc.dei.aor.project.business.model.IScript script, java.lang.String questionText, java.lang.String questionType, java.util.List<java.lang.String> options) throws pt.uc.dei.aor.project.business.exception.IllegalAnswerOptionsException, pt.uc.dei.aor.project.business.exception.IllegalQuestionType... |
private void playShowAnimation(android.view.View view) {
if (null == view) {
return ;
}
if (null != (mShowAnimation)) {
mShowAnimation.cancel();
}
mShowAnimation = new android.view.animation.AlphaAnimation(0.0F, 1.0F);
mShowAnimation.setDuration(com.testcase.modebreakers.myapplic... | private void playShowAnimation(android.view.View view) {
if (null == view) {
return ;
}
mShowAnimation = new android.view.animation.AlphaAnimation(0.0F, 1.0F);
mShowAnimation.setDuration(com.testcase.modebreakers.myapplication.AutoLayout.SHOW_HIDE_DURATION);
mShowAnimation.setFillAfter(true)... |
public boolean equals(java.lang.Object obj) {
if (obj == (this)) {
return true;
}else
if ((!obj) instanceof gov.nist.javax.sip.stack.Dialog) {
return false;
}else {
java.lang.String id1 = this.getDialogId();
java.lang.String id2 = ((gov.nist.javax.sip.... | public boolean equals(java.lang.Object obj) {
if (obj == (this)) {
return true;
}else
if (!(obj instanceof gov.nist.javax.sip.stack.Dialog)) {
return false;
}else {
java.lang.String id1 = this.getDialogId();
java.lang.String id2 = ((gov.nist.javax.sip.... |
public static boolean pushOnThisHourOfTheDay(double accepted, double declined, double manual, int hourOfTheDay) {
double daytimefactor = com.example.puppetmaster.vokabeltrainer.SpacedRepititionSystem.Notifier.PushProbabilityCalculator.getDayTimeFactor(hourOfTheDay);
double result = daytimefactor * ((accepted + ... | public static boolean pushOnThisHourOfTheDay(double accepted, double declined, double manual, int hourOfTheDay) {
double daytimefactor = com.example.puppetmaster.vokabeltrainer.SpacedRepititionSystem.Notifier.PushProbabilityCalculator.getDayTimeFactor(hourOfTheDay);
double result = daytimefactor * ((accepted + ... |
public boolean handleTouchEvent(android.view.MotionEvent event) {
updateCurrentTouchPosition(event);
switch (event.getAction()) {
case android.view.MotionEvent.ACTION_DOWN :
mWasMoved = false;
initializeCircuitComponents();
createCircuitConnection();
break... | public boolean handleTouchEvent(android.view.MotionEvent event) {
updateCurrentTouchPosition(event);
switch (event.getAction()) {
case android.view.MotionEvent.ACTION_DOWN :
mWasMoved = false;
initializeCircuitComponents();
createCircuitConnection();
break... |
private void decreaseTradeResource(client.domestic.ResourceType resource) {
int change = changeAmountOfCards(resource, (-1));
this.tradeOverlay.setResourceAmount(resource, java.lang.Integer.toString(change));
if (change == 0) {
this.tradeOverlay.setResourceAmountChangeEnabled(resource, true, false);... | private void decreaseTradeResource(client.domestic.ResourceType resource) {
int change = changeAmountOfCards(resource, (-1));
this.tradeOverlay.setResourceAmount(resource, java.lang.Integer.toString(change));
this.tradeOverlay.setResourceAmountChangeEnabled(resource, true, true);
if (change == 0) {
... |
public void pause() {
if (((mServiceState) == (com.linhphan.music.util.MusicServiceState.prepared)) || ((mServiceState) == (com.linhphan.music.util.MusicServiceState.playing)))
mp.pause();
mServiceState = com.linhphan.music.util.MusicServiceState.paused;
terminateThread();
notifyMediaPlayer... | public void pause() {
if (((mServiceState) == (com.linhphan.music.util.MusicServiceState.prepared)) || ((mServiceState) == (com.linhphan.music.util.MusicServiceState.playing))) {
mp.pause();
mServiceState = com.linhphan.music.util.MusicServiceState.paused;
}
terminateThread();
notifyMedi... |
public boolean equals(java.lang.Object obj) {
if (!(obj instanceof com.dotcms.uuid.shorty.ShortyId)) {
return false;
}
com.dotcms.uuid.shorty.ShortyId newShorty = ((com.dotcms.uuid.shorty.ShortyId) (obj));
return ((((newShorty.longId) == (this.longId)) && ((newShorty.type) == (this.type))) && ((... | public boolean equals(java.lang.Object obj) {
if (!(obj instanceof com.dotcms.uuid.shorty.ShortyId)) {
return false;
}
com.dotcms.uuid.shorty.ShortyId newShorty = ((com.dotcms.uuid.shorty.ShortyId) (obj));
return (((newShorty.longId.equals(this.longId)) && ((newShorty.type) == (this.type))) && (... |
public math.Scalar mul(math.MathVector v1) {
if ((v1.size) == (this.size)) {
math.Scalar t = s.get(0).add(v1.s.get(0));
for (int i = 0; i < (v1.size); i++) {
t.add(s.get(i).add(v1.s.get(i)));
}
return t;
}
return null;
} | public math.Scalar mul(math.MathVector v1) {
math.Scalar t = s.get(0).add(v1.s.get(0));
for (int i = 1; i < (v1.size); i++) {
t.add(s.get(i).add(v1.s.get(i)));
}
return t;
} |
private petrov.kristiyan.colorpicker.ColorPicker setColors() {
ta = context.getResources().obtainTypedArray(R.array.default_colors);
colors = new java.util.ArrayList<>();
for (int i = 0; i < (ta.length()); i++) {
colors.add(new petrov.kristiyan.colorpicker.ColorPal(ta.getColor(i, 0), false));
}
... | private petrov.kristiyan.colorpicker.ColorPicker setColors() {
android.content.Context context = this.context.get();
if (context == null)
return this;
ta = context.getResources().obtainTypedArray(R.array.default_colors);
colors = new java.util.ArrayList<>();
for (int i = 0; i < (ta.leng... |
public int compare(com.frostwire.search.SearchResult o1, com.frostwire.search.SearchResult o2) {
int n1 = (o1 instanceof com.frostwire.search.torrent.TorrentSearchResult) ? ((com.frostwire.search.torrent.TorrentSearchResult) (o1)).getSeeds() : 0;
int n2 = (o2 instanceof com.frostwire.search.torrent.TorrentSearc... | public int compare(com.frostwire.search.SearchResult o1, com.frostwire.search.SearchResult o2) {
int x = (o1 instanceof com.frostwire.search.torrent.TorrentSearchResult) ? ((com.frostwire.search.torrent.TorrentSearchResult) (o1)).getSeeds() : 0;
int y = (o2 instanceof com.frostwire.search.torrent.TorrentSearchR... |
private void SLLInstruction() {
int rd = file.nextInt();
file.next();
int rs = file.nextInt();
file.next();
int sa = file.nextInt();
file.nextLine();
int funct = 0;
int rt = 0;
java.lang.String opc = "SLL";
ilist.add(((interfaces.IInstruction) (new model.RTypeInstruction(opc, rd,... | private void SLLInstruction() {
int rd = file.nextInt();
int rs = file.nextInt();
int sa = file.nextInt();
file.nextLine();
int funct = 0;
int rt = 0;
java.lang.String opc = "SLL";
ilist.add(((interfaces.IInstruction) (new model.RTypeInstruction(opc, rd, rs, rt, sa, funct))));
} |
public void handleMessage(org.zstack.header.message.Message msg) {
if (msg instanceof org.zstack.storage.backup.sftp.APISearchSftpBackupStorageMsg) {
handle(((org.zstack.storage.backup.sftp.APISearchSftpBackupStorageMsg) (msg)));
}else
if (msg instanceof org.zstack.storage.backup.sftp.APIGetSftp... | public void handleMessage(org.zstack.header.message.Message msg) {
if (msg instanceof org.zstack.storage.backup.sftp.APISearchSftpBackupStorageMsg) {
handle(((org.zstack.storage.backup.sftp.APISearchSftpBackupStorageMsg) (msg)));
}else
if (msg instanceof org.zstack.storage.backup.sftp.APIGetSftp... |
public char getStateRep() {
char toReturn = ' ';
if ((_state) == (State.DEAD)) {
toReturn = '.';
}else
if ((_state) == (State.ALIVE)) {
toReturn = '*';
}else {
toReturn = ' ';
}
return toReturn;
} | public char getStateRep() {
char toReturn = ' ';
if ((_state) == (State.DEAD)) {
toReturn = ' ';
}else
if ((_state) == (State.ALIVE)) {
toReturn = '*';
}else {
toReturn = ' ';
}
return toReturn;
} |
public com.alangpierce.lambdacalculusplayground.expressioncontroller.ExpressionController visit(com.alangpierce.lambdacalculusplayground.userexpression.UserFuncCall funcCall) {
com.alangpierce.lambdacalculusplayground.expressioncontroller.ExpressionController funcController = createController(funcCall.func);
co... | public com.alangpierce.lambdacalculusplayground.expressioncontroller.ExpressionController visit(com.alangpierce.lambdacalculusplayground.userexpression.UserFuncCall funcCall) {
com.alangpierce.lambdacalculusplayground.expressioncontroller.ExpressionController funcController = createController(funcCall.func);
co... |
private void removeSelection(int pos) {
android.view.View view = manager.findViewByPosition(pos);
android.widget.TextView title = ((android.widget.TextView) (view.findViewById(R.id.aa_title)));
android.widget.TextView subtitle = ((android.widget.TextView) (view.findViewById(R.id.subtitle)));
title.setTe... | private void removeSelection(int pos) {
android.view.View view = manager.findViewByPosition(pos);
if (view == null)
return ;
android.widget.TextView title = ((android.widget.TextView) (view.findViewById(R.id.aa_title)));
android.widget.TextView subtitle = ((android.widget.TextView) (view.fi... |
public void testParamWithMatches() {
java.util.Map<java.lang.String, java.lang.Object> params = new java.util.HashMap<java.lang.String, java.lang.Object>();
params.put("param1", "adm.*");
com.orientechnologies.orient.core.sql.query.OSQLSynchQuery sql = new com.orientechnologies.orient.core.sql.query.OSQLSyn... | public void testParamWithMatches() {
java.util.Map<java.lang.String, java.lang.Object> params = new java.util.HashMap<java.lang.String, java.lang.Object>();
params.put("param1", "adm.*");
com.orientechnologies.orient.core.sql.query.OSQLSynchQuery sql = new com.orientechnologies.orient.core.sql.query.OSQLSyn... |
public void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast) {
if ((ast.getType()) == (com.puppycrawl.tools.checkstyle.api.TokenTypes.METHOD_DEF)) {
raiseCounter(ast);
}else {
final boolean inInterface = (ast.getType()) == (com.puppycrawl.tools.checkstyle.api.TokenTypes.INTERFACE_DE... | public void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast) {
if ((ast.getType()) == (com.puppycrawl.tools.checkstyle.api.TokenTypes.METHOD_DEF)) {
if (!(counters.isEmpty())) {
raiseCounter(ast);
}
}else {
final boolean inInterface = (ast.getType()) == (com.pupp... |
public void visit(org.apache.parquet.schema.GroupType groupType) {
org.apache.parquet.format.SchemaElement element = new org.apache.parquet.format.SchemaElement(groupType.getName());
element.setRepetition_type(org.apache.parquet.format.converter.ParquetMetadataConverter.toParquetRepetition(groupType.getRepetiti... | public void visit(org.apache.parquet.schema.GroupType groupType) {
org.apache.parquet.format.SchemaElement element = new org.apache.parquet.format.SchemaElement(groupType.getName());
element.setRepetition_type(toParquetRepetition(groupType.getRepetition()));
if ((groupType.getOriginalType()) != null) {
... |
public final br.com.xavier.io.transform.stream.interfaces.StreamTransformResult<T> transform(java.io.InputStream inputStream) throws java.io.IOException {
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
org.apache.commons.codec.binary.Base64OutputStream base64OutputStream = new org.apa... | public final br.com.xavier.io.transform.stream.interfaces.StreamTransformResult<T> transform(java.io.InputStream inputStream) throws java.io.IOException {
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
org.apache.commons.codec.binary.Base64OutputStream base64OutputStream = new org.apa... |
public void handle(final javafx.event.ActionEvent e) {
final javafx.stage.DirectoryChooser directoryChooser = new javafx.stage.DirectoryChooser();
final java.io.File selectedDirectory = directoryChooser.showDialog(window);
if (selectedDirectory != null) {
selectedDirectory.getAbsolutePath();
... | public void handle(final javafx.event.ActionEvent e) {
final javafx.stage.DirectoryChooser directoryChooser = new javafx.stage.DirectoryChooser();
final java.io.File selectedDirectory = directoryChooser.showDialog(window);
if (selectedDirectory != null) {
selectedDirectory.getAbsolutePath();
... |
public boolean removeAttribute(java.lang.String name) {
boolean result = true;
ownerMessage.addEvent(Type.CLIENT_DELETE_DATA, name, null);
if (super.removeAttribute(name)) {
modified = true;
syncEvents.add(new org.red5.server.so.SharedObjectEvent(org.red5.server.so.ISharedObjectEvent.Type.CL... | public boolean removeAttribute(java.lang.String name) {
boolean result = true;
ownerMessage.addEvent(Type.CLIENT_DELETE_DATA, name, null);
if (super.removeAttribute(name)) {
modified.set(true);
syncEvents.add(new org.red5.server.so.SharedObjectEvent(org.red5.server.so.ISharedObjectEvent.Type... |
public long getStableId() {
if ((mStableId) == null) {
mStableId = ((long) (getId().hashCode()));
mStableId = ((mStableId) << 32) + ((getTimestamp()) & -1);
}
return mStableId.longValue();
} | public long getStableId() {
if ((mStableId) == null) {
mStableId = ((long) (getId().hashCode()));
mStableId = ((mStableId) << 32) + ((getTimestamp()) & -1);
}
return mStableId;
} |
public slp.IRVisitResult visit(slp.ArrayLenExpr expr, slp.IREnvironment env) {
slp.IRVisitResult targetExprResult = expr.expr.accept(this, env);
java.lang.String registerKey = env.getRegisterKey();
env.writeCode(((("Library __checkNullRef(" + (targetExprResult.value)) + "),") + (IREnvironment.RDUMMY)));
... | public slp.IRVisitResult visit(slp.ArrayLenExpr expr, slp.IREnvironment env) {
slp.IRVisitResult targetExprResult = expr.expr.accept(this, env);
java.lang.String registerKey = env.getRegisterKey();
env.writeInstruction("ArrayLength", targetExprResult.value, registerKey);
return new slp.IRVisitResult(env... |
public double calculatePlagiarismRatio(java.util.HashMap<java.lang.String, java.util.HashSet<java.lang.String>> synonymsMap, java.util.List<main.java.NTuple> nTuples1, java.util.List<main.java.NTuple> nTuples2) {
double count = 0;
for (main.java.NTuple nTuple1 : nTuples1) {
for (main.java.NTuple nTuple2... | public double calculatePlagiarismRatio(java.util.HashMap<java.lang.String, java.util.HashSet<java.lang.String>> synonymsMap, java.util.List<main.java.NTuple> nTuples1, java.util.List<main.java.NTuple> nTuples2) {
double count = 0;
if ((nTuples1.size()) == 0)
return count;
for (main.java.NTuple ... |
protected static com.mcmoddev.lib.init.Block createNetherOre(com.mcmoddev.lib.material.MetalMaterial material) {
if (material == null) {
return null;
}
if (((com.mcmoddev.basemetals.util.Config.Options.enableBasics) && (material.hasOre)) && ((material.ore) == null)) {
material.oreNether = co... | protected static com.mcmoddev.lib.init.Block createNetherOre(com.mcmoddev.lib.material.MetalMaterial material) {
if (material == null) {
return null;
}
if (((com.mcmoddev.basemetals.util.Config.Options.enableBasics) && (material.hasOre)) && ((material.oreNether) == null)) {
material.oreNethe... |
public void onCharacteristicWrite(android.bluetooth.BluetoothGatt gatt, android.bluetooth.BluetoothGattCharacteristic characteristic, int status) {
if ((mEventListener) != null) {
java.util.UUID uuidServ = characteristic.getService().getUuid();
java.util.UUID uuidChar = characteristic.getUuid();
... | public void onCharacteristicWrite(android.bluetooth.BluetoothGatt gatt, android.bluetooth.BluetoothGattCharacteristic characteristic, int status) {
if ((mEventListener) != null) {
java.util.UUID uuidServ = characteristic.getService().getUuid();
java.util.UUID uuidChar = characteristic.getUuid();
... |
public void testNoApksGiven() throws java.lang.Exception {
at.favre.tools.apksigner.SignToolTest.copyToTestPath(originalFolder, java.util.Collections.singletonList(testReleaseKs));
java.lang.String cmd = (((((((("-" + (at.favre.tools.apksigner.ui.CLIParser.ARG_APK_FILE)) + " ") + (originalFolder.getAbsolutePath... | public void testNoApksGiven() throws java.lang.Exception {
at.favre.tools.apksigner.SignToolTest.copyToTestPath(originalFolder, java.util.Collections.singletonList(testReleaseKs));
java.lang.String cmd = (((((((("-" + (at.favre.tools.apksigner.ui.CLIParser.ARG_APK_FILE)) + " ") + (originalFolder.getAbsolutePath... |
public static com.example.user.encapsulate.VideoPlayerFragment newInstance(java.lang.String url) {
MainActivity.YOrN = true;
com.example.user.encapsulate.VideoPlayerFragment videoPlayerFragment = new com.example.user.encapsulate.VideoPlayerFragment();
android.os.Bundle bundle = new android.os.Bundle();
... | public static com.example.user.encapsulate.VideoPlayerFragment newInstance(java.lang.String url) {
com.example.user.encapsulate.VideoPlayerFragment videoPlayerFragment = new com.example.user.encapsulate.VideoPlayerFragment();
android.os.Bundle bundle = new android.os.Bundle();
bundle.putString("url", url);
... |
public void update() {
super.update();
if (((LD39.s.gs.money) >= 250) && ((power) < ((getMaxPower()) - 1))) {
LD39.s.gs.money -= getFuelCost();
hasFuel = true;
isPowered = 1;
}else {
hasFuel = false;
isPowered = 0;
}
} | public void update() {
if (((LD39.s.gs.money) >= 250) && ((power) < ((getMaxPower()) - 1))) {
LD39.s.gs.money -= getFuelCost();
hasFuel = true;
isPowered = 1;
}else {
hasFuel = false;
isPowered = 0;
}
super.update();
} |
@MinLen(value = 5)
int[] arr = new int[5];
int a = 9;
a += 4;
a--;
@MinLen(value = 12)
int[] arr1 = new int[a];
@MinLen(value = 3)
java.lang.Integer[] arr2 = new java.lang.Integer[]{ 1 , 2 , 3 };
@MinLen(value = 4)
java.lang.Integer[] arr3 = new java.lang.Integer[]{ 4 , 5 , 6... | int[] arr = new int[5];
int a = 9;
a += 5;
a -= 2;
int[] arr1 = new int[a];
int[] arr2 = new int[]{ 1 , 2 , 3 };
int[] arr3 = new int[]{ 4 , 5 , 6 };
int[] arr4 = new int[4];
int[] arr5 = new int[a];
} |
public void afterTextChanged(android.text.Editable s) {
java.lang.String strPinCode = auto_pincodeNominee.getText().toString();
if (!(finalPincodeList.contains(strPinCode))) {
auto_pincodeNominee.setError("Invalid Pincode");
return ;
}else {
auto_pincodeNominee.setError(null);
... | public void afterTextChanged(android.text.Editable s) {
java.lang.String strPinCode = auto_pincodeNominee.getText().toString();
if (((strPinCode != null) && ((strPinCode.length()) > 0)) && (!(finalPincodeList.contains(strPinCode)))) {
auto_pincodeNominee.setError("Invalid Pincode");
return ;
... |
public boolean onTouchEvent(android.view.MotionEvent ev) {
switch (ev.getAction()) {
case android.view.MotionEvent.ACTION_UP :
int scrollX = getScrollX();
if (scrollX > ((mMenuWidth) / 2)) {
showMenu();
}else {
hideMenu();
}
... | public boolean onTouchEvent(android.view.MotionEvent ev) {
switch (ev.getAction()) {
case android.view.MotionEvent.ACTION_UP :
int scrollX = getScrollX();
if (scrollX < ((mMenuWidth) / 2)) {
showMenu();
}else {
hideMenu();
}
... |
public static void open(java.lang.Long id) {
models.Project entity = models.Project.findById(id);
notFoundIfNull(entity);
entity.isOpen = true;
entity.save();
flash.success(play.i18n.Messages.get("scaffold.updated", "Project"));
controllers.Projects.index();
} | public static void open(java.lang.Long id) {
models.Project entity = models.Project.findById(id);
notFoundIfNull(entity);
entity.isOpen = true;
entity.save();
flash.success(play.i18n.Messages.get("scaffold.updated", "Project"));
controllers.Projects.show(id);
} |
public java.lang.String getGroupname(java.lang.String clientkey, int groupId) {
if ((!(clientkey.equals(""))) && (groupId != (-1))) {
tool.out(("GROUPID: " + groupId));
int service = getClientServiceByKey(clientkey);
return serviceList.get(service).groupList.get(groupId);
}else {
... | public java.lang.String getGroupname(java.lang.String clientkey, int groupId) {
if ((!(clientkey.equals(""))) && (groupId != (-1))) {
int service = getClientServiceByKey(clientkey);
return serviceList.get(service).groupList.get(groupId);
}else {
return "noGroup";
}
} |
public void insertHead(int id) {
idv.carl.datastructures.list.DoubleLinkedNode newNode = new idv.carl.datastructures.list.DoubleLinkedNode(id);
if (isEmpty()) {
tail = newNode;
}else {
head.setPrevious(newNode);
}
newNode.setNext(head);
head = newNode;
(size)++;
} | public void insertHead(int id) {
idv.carl.datastructures.list.DoubleLinkedNode newNode = new idv.carl.datastructures.list.DoubleLinkedNode(id);
if (isEmpty()) {
tail = newNode;
}else {
head.setPrevious(newNode);
newNode.setNext(head);
}
head = newNode;
(size)++;
} |
public void openCell(android.widget.ImageView view, int coordinate) {
if ((!(mapOpenCell[coordinate])) && (!(isFlag(coordinate)))) {
mapOpenCell[coordinate] = true;
addPoints();
setImage(view, coordinate);
}
} | public void openCell(android.widget.ImageView view, int coordinate) {
if ((!(mapOpenCell[coordinate])) && (!(isFlag(coordinate)))) {
mapOpenCell[coordinate] = true;
setImage(view, coordinate);
addPoints();
}
} |
public void repaint() {
if (settings.isConsoleMode()) {
consoleDisplay.render();
}else {
for (int i = 0; i < (gPanels.length); i++) {
gPanels[i].repaint();
}
}
} | public void render() {
if (settings.isConsoleMode()) {
consoleDisplay.render();
}else {
for (int i = 0; i < (gPanels.length); i++) {
gPanels[i].render();
}
}
} |
public com.mememachine.mike.laboratorynotehelper.Notebook getNotebook(java.util.UUID id) {
com.mememachine.mike.laboratorynotehelper.database.DatabaseCursorWrapper cursorWrapper = queryDatabases(((NoteSchema.NoteTable.Cols.UUID) + " = ?"), new java.lang.String[]{ id.toString() }, NoteSchema.NoteTable.TABLE_NOTEBOOK... | public com.mememachine.mike.laboratorynotehelper.Notebook getNotebook(java.util.UUID id) {
com.mememachine.mike.laboratorynotehelper.database.DatabaseCursorWrapper cursorWrapper = queryDatabases(null, ((NoteSchema.NoteTable.Cols.UUID) + " = ?"), new java.lang.String[]{ id.toString() }, NoteSchema.NoteTable.TABLE_NO... |
public void testAnalyze() throws java.io.IOException, java.lang.ClassNotFoundException {
java.lang.System.out.println("analyze");
aptgraph.server.RequestHandler handler = new aptgraph.server.RequestHandler(java.nio.file.Paths.get("src/test/resources/dummyDir"));
handler.getUsers();
handler.analyze("253.... | public void testAnalyze() throws java.io.IOException, java.lang.ClassNotFoundException {
java.lang.System.out.println("analyze");
aptgraph.server.RequestHandler handler = new aptgraph.server.RequestHandler(java.nio.file.Paths.get("src/test/resources/dummyDir"));
handler.getUsers();
handler.analyze("253.... |
public void writeInvJump(dyvil.tools.compiler.backend.MethodWriter writer, int varIndex, dyvil.tools.compiler.ast.type.IType matchedType, dyvil.tools.asm.Label elseLabel) throws dyvil.tools.compiler.backend.exception.BytecodeException {
if ((this.variable) != null) {
this.variable.setType(this.type);
... | public void writeInvJump(dyvil.tools.compiler.backend.MethodWriter writer, int varIndex, dyvil.tools.compiler.ast.type.IType matchedType, dyvil.tools.asm.Label elseLabel) throws dyvil.tools.compiler.backend.exception.BytecodeException {
if ((this.variable) != null) {
dyvil.tools.compiler.ast.pattern.IPatter... |
private org.springframework.http.ResponseEntity<java.lang.String> constructErrorResponse(java.lang.String errorMsg, org.springframework.http.HttpStatus status) {
org.springframework.http.HttpHeaders httpHeaders = new org.springframework.http.HttpHeaders();
httpHeaders.setContentType(MediaType.APPLICATION_JSON_U... | private org.springframework.http.ResponseEntity<java.lang.Object> constructErrorResponse(java.lang.String errorMsg, org.springframework.http.HttpStatus status) {
org.springframework.http.HttpHeaders httpHeaders = new org.springframework.http.HttpHeaders();
httpHeaders.setContentType(MediaType.APPLICATION_JSON_U... |
public static void main(java.lang.String[] args) {
javafx.application.Application.launch(null);
org.apache.log4j.PropertyConfigurator.configure("log4j.properties");
com.mscs_710l.systemantics.ui.HomeScreen.LOGGER.debug("SySTematics main(): starts");
com.mscs_710l.systemantics.bl.CpuInfo cpuInfo = new co... | public static void main(java.lang.String[] args) {
javafx.application.Application.launch(args);
org.apache.log4j.PropertyConfigurator.configure("log4j.properties");
com.mscs_710l.systemantics.ui.HomeScreen.LOGGER.debug("SySTematics main(): starts");
com.mscs_710l.systemantics.bl.CpuInfo cpuInfo = new co... |
protected com.liferay.dynamic.data.lists.model.DDLRecordSet addRecordSet(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletResponse portletResponse) throws java.lang.Exception {
com.liferay.dynamic.data.mapping.storage.DDMFormValues settingsDDMFormValues = getSettingsDDMFormValues(portletRequest);
... | protected com.liferay.dynamic.data.lists.model.DDLRecordSet addRecordSet(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletResponse portletResponse) throws java.lang.Exception {
com.liferay.dynamic.data.mapping.storage.DDMFormValues settingsDDMFormValues = getSettingsDDMFormValues(portletRequest);
... |
public boolean applicable(final org.eclipse.sapphire.services.ServiceContext context) {
boolean retval = false;
final org.eclipse.sapphire.ValueProperty prop = context.find(org.eclipse.sapphire.ValueProperty.class);
org.eclipse.sapphire.ValueProperty property = com.liferay.ide.project.core.modules.BaseModul... | public boolean applicable(final org.eclipse.sapphire.services.ServiceContext context) {
boolean retval = false;
final org.eclipse.sapphire.ValueProperty prop = context.find(org.eclipse.sapphire.ValueProperty.class);
org.eclipse.sapphire.ValueProperty property = com.liferay.ide.project.core.modules.BaseModul... |
public void contextInitialized(javax.servlet.ServletContextEvent arg0) {
com.yyy.dao.HBaseUtils.init();
com.yyy.dao.HBaseDAO.init();
java.lang.String resourcePath = ((arg0.getServletContext().getRealPath("/")) + "resource") + (java.io.File.separator);
edu.stanford.nlp.Tagging.init(resourcePath);
com... | public void contextInitialized(javax.servlet.ServletContextEvent arg0) {
com.yyy.dao.HBaseUtils.init();
com.yyy.dao.HBaseDAO.init();
java.lang.String resourcePath = ((arg0.getServletContext().getRealPath("/")) + "resource") + (java.io.File.separator);
java.lang.System.out.println(resourcePath);
edu.... |
public java.lang.String getFileRollContents(java.lang.String type) {
java.lang.String value = "";
try {
if (type.equals("hadoop")) {
value = frDao.getFileRollFile();
}else {
value = hdfsDao.getFileRollFile();
}
} catch (java.lang.Exception e) {
}
retur... | public java.lang.String getFileRollContents(java.lang.String type) {
java.lang.String value = "";
try {
if (type.equals("hadoop")) {
value = hdfsDao.getFileRollFile();
}else {
value = frDao.getFileRollFile();
}
} catch (java.lang.Exception e) {
}
retur... |
private boolean checkAvailable(Room room, java.util.Calendar sDate, java.util.Calendar eDate) {
java.util.Iterator<Reservation> iter = reservationIterator(sDate, eDate);
while (iter.hasNext()) {
Reservation reservation = iter.next();
if ((reservation.getRoomNumber()) == (room.getRoomNumber()))
... | private boolean checkAvailable(Room room, java.util.Calendar sDate) {
java.util.Iterator<Reservation> iter = reservationIterator(sDate);
while (iter.hasNext()) {
Reservation reservation = iter.next();
if ((reservation.getRoomNumber()) == (room.getRoomNumber()))
return false;
... |
public static void displayError(java.lang.String title, java.lang.Throwable t, org.encog.workbench.frames.document.tree.ProjectFile network, org.encog.ml.data.MLDataSet set) {
if (t instanceof org.encog.EncogError) {
org.encog.workbench.EncogWorkBench.displayError(title, ("An error occured while performing ... | public static void displayError(java.lang.String title, java.lang.Throwable t, org.encog.workbench.frames.document.tree.ProjectFile network, org.encog.ml.data.MLDataSet set) {
if (t instanceof org.encog.EncogError) {
org.encog.workbench.EncogWorkBench.displayError(title, ("An error occured while performing ... |
public void testOrderBook() throws java.lang.Exception {
final eu.bittrade.libs.steemj.base.models.OrderBook orderBook = steemApiWrapper.getOrderBook(1);
org.hamcrest.MatcherAssert.assertThat(orderBook.getAsks().size(), org.hamcrest.Matchers.equalTo(1));
org.hamcrest.MatcherAssert.assertThat(orderBook.getBi... | public void testOrderBook() throws java.lang.Exception {
final eu.bittrade.libs.steemj.base.models.OrderBook orderBook = steemApiWrapper.getOrderBook(1);
org.hamcrest.MatcherAssert.assertThat(orderBook.getAsks().size(), org.hamcrest.Matchers.equalTo(1));
org.hamcrest.MatcherAssert.assertThat(orderBook.getBi... |
public com.mediamath.terminalone.models.reporting.meta.MetaData getReportsMeta(com.mediamath.terminalone.models.reporting.Reports report) {
java.lang.StringBuffer reportName = new java.lang.StringBuffer(report.getReportNameWithMeta());
java.lang.String finalPath = tOneService.constructReportingUrl(reportName);
... | public com.mediamath.terminalone.models.reporting.meta.MetaData getReportsMeta(com.mediamath.terminalone.models.reporting.Reports report) {
java.lang.StringBuffer reportName = new java.lang.StringBuffer(report.getReportNameWithMeta());
java.lang.String finalPath = tOneService.constructReportingUrl(reportName);
... |
public void onValueChange(android.widget.NumberPicker picker, int oldVal, int newVal) {
fromTime = newVal;
toPicker.setValue(0);
toPicker.setMinValue(((fromTime) + 1));
toPicker.setMaxValue(28);
toPicker.setDisplayedValues(com.wafflestudio.snutt.SNUTTUtils.getTimeList(((fromTime) + 1), 28));
toP... | public void onValueChange(android.widget.NumberPicker picker, int oldVal, int newVal) {
fromTime = newVal;
toPicker.setDisplayedValues(null);
toPicker.setValue(((fromTime) + 1));
toPicker.setMinValue(((fromTime) + 1));
toPicker.setMaxValue(28);
toPicker.setDisplayedValues(com.wafflestudio.snutt.... |
public void setParameter(org.compiere.process.ProcessInfoParameter[] parameters) {
this.parameters = new java.util.Hashtable<java.lang.String, org.compiere.process.ProcessInfoParameter>();
for (org.compiere.process.ProcessInfoParameter parameter : parameters) {
if ((parameter.getParameterName()) == null... | public void setParameter(org.compiere.process.ProcessInfoParameter[] parameters) {
if (parameters == null) {
this.parameters = null;
return ;
}
this.parameters = new java.util.Hashtable<java.lang.String, org.compiere.process.ProcessInfoParameter>();
for (org.compiere.process.ProcessInfoP... |
public void create() {
batch = new com.badlogic.gdx.graphics.g2d.SpriteBatch();
debugger = new com.badlogic.gdx.graphics.glutils.ShapeRenderer();
level = new game.Level();
camera = new com.badlogic.gdx.graphics.OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
camera.setToOrtho(... | public void create() {
batch = new com.badlogic.gdx.graphics.g2d.SpriteBatch();
debugger = new com.badlogic.gdx.graphics.glutils.ShapeRenderer();
level = new game.Level();
camera = new com.badlogic.gdx.graphics.OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
camera.setToOrtho(... |
private static long initLongValue(java.util.Properties properties, java.lang.String property, long defaultValue) {
if ((properties == null) || ((properties.get(property)) == null)) {
return defaultValue;
}
java.lang.String value = properties.getProperty(property);
try {
return java.lang.... | private static long initLongValue(java.util.Properties properties, java.lang.String property, long defaultValue) {
if ((properties == null) || ((properties.get(property)) == null)) {
return defaultValue;
}
java.lang.String value = properties.getProperty(property);
try {
return java.lang.... |
public void validateThirdPartyProductInfo(final com.blackducksoftware.integration.validator.ValidationResults result) {
if (org.apache.commons.lang3.StringUtils.isBlank(thirdPartyName.getName())) {
result.addResult(PhoneHomeRequestFieldEnum.THIRDPARTYNAME, new com.blackducksoftware.integration.validator.Val... | public void validateThirdPartyProductInfo(final com.blackducksoftware.integration.validator.ValidationResults result) {
if (((thirdPartyName) == null) || (org.apache.commons.lang3.StringUtils.isBlank(thirdPartyName.getName()))) {
result.addResult(PhoneHomeRequestFieldEnum.THIRDPARTYNAME, new com.blackduckso... |
public void put(decc.dht.Key k, decc.dht.Key v) {
clean();
java.util.Map<decc.dht.Key, java.lang.Long> rts = routes.get(k);
if (rts == null) {
rts = new java.util.TreeMap<>();
routes.put(k, rts);
}
rts.put(v, decc.dht.DhtRoutingTable.DELAY);
} | public void put(decc.dht.Key k, decc.dht.Key v) {
java.util.Map<decc.dht.Key, java.lang.Long> rts = routes.get(k);
if (rts == null) {
rts = new java.util.TreeMap<>();
routes.put(k, rts);
}
rts.put(v, decc.dht.DhtRoutingTable.DELAY);
} |
private void build() {
java.util.Objects.requireNonNull(clusterAccess, "clusterAccess");
java.util.Objects.requireNonNull(log, "log");
this.resolvedMode = clusterAccess.resolvePlatformMode(platformMode, log);
if (((resolvedMode) != (io.fabric8.maven.core.config.PlatformMode.kubernetes)) && ((resolvedMod... | private void init() {
java.util.Objects.requireNonNull(clusterAccess, "clusterAccess");
java.util.Objects.requireNonNull(log, "log");
this.resolvedMode = clusterAccess.resolvePlatformMode(platformMode, log);
if (((resolvedMode) != (io.fabric8.maven.core.config.PlatformMode.kubernetes)) && ((resolvedMode... |
public java.util.List<prada.lab.android.pingo.model.PingoPlace> apply(java.util.List<prada.lab.android.pingo.model.PingoPlace> places) throws java.lang.Exception {
java.util.List<prada.lab.android.pingo.model.PingoPlace> filtered = new java.util.ArrayList<>();
for (prada.lab.android.pingo.model.PingoPlace place... | public java.util.ArrayList<prada.lab.android.pingo.model.PingoPlace> apply(java.util.ArrayList<prada.lab.android.pingo.model.PingoPlace> places) throws java.lang.Exception {
java.util.ArrayList<prada.lab.android.pingo.model.PingoPlace> filtered = new java.util.ArrayList<>();
for (prada.lab.android.pingo.model.P... |
public model.Routelike getLikeByUser(model.RoutelikeId routelikeid) {
@java.lang.SuppressWarnings(value = "unchecked")
java.util.List<model.Routelike> routelikes = ((java.util.List<model.Routelike>) (getHibernateTemplate().find("from Routelike as r where r.id.routeid=? and r.id.userid=? ", routelikeid.getRoutei... | public model.Routelike getLikeByUser(model.RoutelikeId routelikeid) {
@java.lang.SuppressWarnings(value = "unchecked")
java.util.List<model.Routelike> routelikes = ((java.util.List<model.Routelike>) (getHibernateTemplate().find("from Routelike as r where r.id.routeid=? and r.id.userid=? ", routelikeid.getRoutei... |
private void request(final java.lang.String method, final javax.ws.rs.client.WebTarget resource, final javax.ws.rs.client.Invocation.Builder request) throws com.spotify.docker.client.exceptions.DockerException, java.lang.InterruptedException {
try {
headers(request).async().method(method, java.lang.String.c... | protected void request(final java.lang.String method, final javax.ws.rs.client.WebTarget resource, final javax.ws.rs.client.Invocation.Builder request) throws com.spotify.docker.client.exceptions.DockerException, java.lang.InterruptedException {
try {
headers(request).async().method(method, java.lang.String... |
public java.lang.Object deleteUser(int id, javax.servlet.http.HttpServletRequest request) {
java.util.Map<java.lang.String, java.lang.Object> map = new java.util.HashMap<java.lang.String, java.lang.Object>();
if (userSrv.deleteUser(id)) {
map.put("success", true);
}else {
map.put("success", ... | public java.lang.Object deleteUser(int id, javax.servlet.http.HttpServletRequest request) {
java.util.Map<java.lang.String, java.lang.Object> map = new java.util.HashMap<java.lang.String, java.lang.Object>();
if (userSrv.deleteUser(id)) {
map.put("success", true);
}else {
map.put("success", ... |
public void setDataBox(com.dreamfly.timeschedule.model.TimeStruct timeStruct) {
mTSBox.setId(timeStruct.getId());
mTSBox.setB_finish(timeStruct.getB_finish());
mTSBox.setS_title(timeStruct.getS_titile());
mTSBox.setI_status(timeStruct.getI_status());
mTSBox.setS_start_time(timeStruct.getS_start_time... | public void setDataBox(com.dreamfly.timeschedule.model.TimeStruct timeStruct) {
mTSBox.setB_finish(timeStruct.getB_finish());
mTSBox.setS_title(timeStruct.getS_titile());
mTSBox.setI_status(timeStruct.getI_status());
mTSBox.setS_start_time(timeStruct.getS_start_time());
com.dreamfly.timeschedule.uti... |
public void generateEntitiesAllPackagesList() {
org.hibernate.tool.hbm2x.doc.DocFile docFile = docFileManager.getAllPackagesDocFile();
java.io.File file = docFile.getFile();
java.util.Map parameters = new java.util.HashMap();
parameters.put("docFile", docFile);
java.util.List list = docHelper.getPac... | public void generateEntitiesAllPackagesList() {
org.hibernate.tool.hbm2x.doc.DocFile docFile = docFileManager.getAllPackagesDocFile();
java.io.File file = docFile.getFile();
java.util.Map parameters = new java.util.HashMap();
parameters.put("docFile", docFile);
java.util.List list = docHelper.getPac... |
public boolean isDirty() throws java.io.IOException {
if ((commit) == null)
return true;
com.beijunyi.parallelgit.utils.io.TreeSnapshot root = fileStore.getRoot().takeSnapshot(false, true);
assert root != null;
return commit.getTree().equals(root.getId());
} | public boolean isDirty() throws java.io.IOException {
if ((commit) == null)
return true;
com.beijunyi.parallelgit.utils.io.TreeSnapshot root = fileStore.getRoot().takeSnapshot(false, true);
assert root != null;
return !(commit.getTree().equals(root.getId()));
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.