buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void saveVolumeMode(java.lang.String modeName) {
for (int i = 0; i < (mVolMember.size()); i++) {
android.util.Log.d(com.app.kent.volume.Main.TAG, ("saveVolumeMode - i = " + (mVolMember.get(i).getCurrent(i))));
settings.edit().putInt(((("[" + modeName) + "]") + i), mVolMember.get(i).getCurrent... | public void saveVolumeMode(java.lang.String modeName) {
for (int i = 0; i < (mVolMember.size()); i++) {
settings.edit().putInt(((("[" + modeName) + "]") + i), mVolMember.get(i).getCurrent(i)).apply();
}
} |
public void printSingleSolutionToOutput(org.intervarsity.Solution sol) {
sol.findAllMembers(schedules, org.intervarsity.BibleStudySchedulerWindow.blockSize);
java.util.ArrayList<org.intervarsity.Session> sessions = sol.getSessions();
for (org.intervarsity.Session s : sessions) {
java.util.ArrayList<... | public void printSingleSolutionToOutput(org.intervarsity.Solution sol) {
java.util.ArrayList<org.intervarsity.Session> sessions = sol.getSessions();
for (org.intervarsity.Session s : sessions) {
textSolutionOutput.append(((times[s.time]) + ":\n"));
textSolutionOutput.append(s.toString());
}
... |
boolean release() {
if ((currentPlayer) != null) {
currentPlayer.reset();
currentPlayer.release();
currentPlayer = null;
context = null;
android.util.Log.d(com.huhx0015.hxaudio.audio.HXMusicEngine.LOG_TAG, "RELEASE: release(): MediaPlayer object has been released.");
... | boolean release() {
if ((currentPlayer) != null) {
currentPlayer.reset();
currentPlayer.release();
currentPlayer = null;
android.util.Log.d(com.huhx0015.hxaudio.audio.HXMusicEngine.LOG_TAG, "RELEASE: release(): MediaPlayer object has been released.");
return true;
}else {... |
public int getItemCount() {
int count = 0;
if ((mMiscSections) != null) {
count = mMiscSections.size();
}
return ((mSections.lastKey()) + (mSections.lastEntry().getValue().getItemCount())) + count;
} | public int getItemCount() {
int count = 0;
if ((mMiscSections) != null) {
count = mMiscSections.size();
}
for (int i = 0; i < (mSections.size()); i++) {
count += mSections.get(i).getItemCount();
}
return count;
} |
private java.util.List<cz.muni.fi.pb138.accountingxml.Invoice> parseInvoices(org.xmldb.api.base.ResourceSet resourceSet, cz.muni.fi.pb138.accountingxml.AccountingYear year) throws org.xmldb.api.base.XMLDBException {
java.util.List<cz.muni.fi.pb138.accountingxml.Invoice> result = new java.util.ArrayList<>();
for... | private java.util.List<cz.muni.fi.pb138.accountingxml.Invoice> parseInvoices(org.xmldb.api.base.ResourceSet resourceSet, cz.muni.fi.pb138.accountingxml.AccountingYear year) throws org.xmldb.api.base.XMLDBException {
assert resourceSet != null;
assert year != null;
java.util.List<cz.muni.fi.pb138.accountingx... |
public java.util.Set<matjuice.analysis.MallocSite> commonMallocSites(matjuice.analysis.PointsToValue other) {
java.util.Set<matjuice.analysis.MallocSite> commonMallocs = new java.util.HashSet<>();
for (matjuice.analysis.MallocSite m : this.mallocs.keySet()) {
if (other.mallocs.containsKey(m))
... | public java.util.Set<matjuice.analysis.MallocSite> commonMallocSites(matjuice.analysis.PointsToValue other) {
java.util.Set<matjuice.analysis.MallocSite> commonMallocs = new java.util.HashSet<>();
for (matjuice.analysis.MallocSite m : this.mallocs.keySet()) {
if ((other.mallocs.containsKey(m)) && (!(thi... |
public void run() {
mCalendar.setTimeInMillis(java.lang.System.currentTimeMillis());
int seconds = me.dominicc.lhpwatch.TimeUtil.calcSecondsLeftInCurrentInterval(dayType, mCalendar);
if (seconds <= 60) {
shouldShowSeconds = true;
secondsToPrint = seconds;
invalidate();
}else {
... | public void run() {
mCalendar.setTimeInMillis(java.lang.System.currentTimeMillis());
int seconds = me.dominicc.lhpwatch.TimeUtil.calcSecondsLeftInCurrentInterval(dayType, mCalendar);
if (seconds <= 60) {
shouldShowSeconds = true;
secondsToPrint = seconds;
invalidate();
}else {
... |
protected void onLoaderStart(java.io.File file, boolean isForceStop) {
java.awt.image.BufferedImage thumbnail = thumbnails.get(file, 32, 32, false, true, ImageUtils.FORMAT.JPG);
if (thumbnail != null) {
showImage(file, thumbnail);
}else {
showImage(file, null);
}
} | protected void onLoaderStart(java.io.File file, boolean isForceStop) {
java.awt.image.BufferedImage thumbnail = thumbnails.get(file, 32, 32, false, true, ImageUtils.FORMAT.JPG);
if (thumbnail != null) {
showImage(file, thumbnail, false);
}else {
showImage(file, null, false);
}
} |
private void hasIdOtherTableTest() {
com.github.moko256.twicalico.database.CachedIdListSQLiteOpenHelper helper2 = new com.github.moko256.twicalico.database.CachedIdListSQLiteOpenHelper(android.support.test.InstrumentationRegistry.getTargetContext(), 0, "testIdDatabase2");
org.junit.Assert.assertTrue(helper2.has... | private void hasIdOtherTableTest() {
com.github.moko256.twicalico.database.CachedIdListSQLiteOpenHelper helper2 = new com.github.moko256.twicalico.database.CachedIdListSQLiteOpenHelper(android.support.test.InstrumentationRegistry.getTargetContext(), 0, "testIdDatabase2");
boolean[] result = helper2.hasIdsOtherT... |
private void runSimulationInNewThread() {
for (final java.util.Map.Entry<java.lang.Integer, org.lemsml.jlems.core.run.RunConfig> conf : runConfigs.entrySet()) {
multiThreadService.execute(new java.lang.Runnable() {
@java.lang.Override
public void run() {
try {
... | protected void runSimulationInNewThread() {
for (final java.util.Map.Entry<java.lang.Integer, org.lemsml.jlems.core.run.RunConfig> conf : runConfigs.entrySet()) {
multiThreadService.execute(new java.lang.Runnable() {
@java.lang.Override
public void run() {
try {
... |
public void testKmpFailureFunction1() {
char[] pattern = "ACACAGT".toCharArray();
int[] borderTable = matcher.kmpFailureFunction(pattern, 0);
org.hamcrest.MatcherAssert.assertThat(box(borderTable), org.hamcrest.Matchers.arrayContaining(0, 0, 1, 2, 3, 0, 0));
} | public void testKmpFailureFunction1() {
char[] pattern = "ACACAGT".toCharArray();
int[] borderTable = matcher.kmpFailureFunction(pattern, 0);
org.hamcrest.MatcherAssert.assertThat(box(borderTable, 0), org.hamcrest.Matchers.arrayContaining(0, 0, 1, 2, 3, 0, 0));
} |
private void setupViewPager(android.support.v4.view.ViewPager viewPager) {
appy.com.wazznowapp.EventChatFragment.ViewPagerAdapter adapter = new appy.com.wazznowapp.EventChatFragment.ViewPagerAdapter(getSupportFragmentManager());
adapter.addFragment(new appy.com.wazznowapp.ChatStadiumFragment(), "STADIUM");
... | private void setupViewPager(android.support.v4.view.ViewPager viewPager) {
appy.com.wazznowapp.EventChatFragment.ViewPagerAdapter adapter = new appy.com.wazznowapp.EventChatFragment.ViewPagerAdapter(getSupportFragmentManager());
adapter.addFragment(new appy.com.wazznowapp.ChatStadiumFragment(), "STADIUM");
... |
public void newBoard() {
resetNumbers();
bombPos = new java.util.HashSet<>();
positionFilled = new java.util.HashSet<>();
revealedArea = new java.util.HashSet<>();
for (int i = 0; i < (y); i++) {
for (int j = 0; j < (x); j++) {
board[j][i] = 20;
}
}
} | public void newBoard() {
bombPos = new java.util.HashSet<>();
positionFilled = new java.util.HashSet<>();
revealedArea = new java.util.HashSet<>();
for (int i = 0; i < (y); i++) {
for (int j = 0; j < (x); j++) {
board[j][i] = 20;
}
}
} |
private void updateUI() {
if (!((retrievedgrouplist) == null)) {
final java.util.ArrayList<www.weride.com.classes.Group> groups = retrievedgrouplist;
www.weride.com.classes.GroupsListAdapter adapter = new www.weride.com.classes.GroupsListAdapter(this.getContext(), groups, at);
groupsview.set... | private void updateUI() {
if (!((retrievedgrouplist) == null)) {
final java.util.ArrayList<www.weride.com.classes.Group> groups = retrievedgrouplist;
if ((getActivity()) != null) {
adapter = new www.weride.com.classes.GroupsListAdapter(getContext(), groups, at);
groupsview.se... |
private static void incrementDictCount(java.util.HashMap<java.lang.String, java.lang.Integer> hashMap, java.lang.String key) {
if ((key.length()) < 2) {
return ;
}
if (hashMap.containsKey(key)) {
int count = hashMap.get(key);
hashMap.put(key, (count + 1));
}else {
hashMap... | private static void incrementDictCount(java.util.HashMap<java.lang.String, java.lang.Integer> hashMap, java.lang.String key) {
if (hashMap.containsKey(key)) {
int count = hashMap.get(key);
hashMap.put(key, (count + 1));
}else {
hashMap.put(key, 1);
}
} |
public void testTiedSoGoToTB() {
swissTournamentRunner.Player p1 = new swissTournamentRunner.Player("P1", 3, 1, 0, 0, 0);
swissTournamentRunner.Player p2 = new swissTournamentRunner.Player("P2", 3, 0, 0, 0, 0);
t.addPlayer("P1");
t.addPlayer("P2");
org.junit.Assert.assertEquals((-1), p1.compareTo(p2... | public void testTiedSoGoToTB() {
swissTournamentRunner.Player p1 = new swissTournamentRunner.Player("P1", 3, 1, 0, 0);
swissTournamentRunner.Player p2 = new swissTournamentRunner.Player("P2", 3, 0, 0, 0);
t.addPlayer("P1");
t.addPlayer("P2");
org.junit.Assert.assertEquals((-1), p1.compareTo(p2));
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
versionTextView = ((android.widget.TextView) (findViewById(R.id.version)));
try {
if (org.site_monitor.BuildConfig.DEBUG) {
versionTextView.set... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
versionTextView = ((android.widget.TextView) (findViewById(R.id.version)));
try {
versionTextView.setText(getPackageManager().getPackageInfo(getPackageName... |
errors.clear();
try {
enoughPeriodsPerWeek(c);
} catch (classscheduling.ValidationException ve) {
}
if (errors.hasErrors()) {
fillSlotWithNextAvailableCourse(slot);
}else {
fillSlot(slot, c);
}
} | classscheduling.Course result = c;
errors.clear();
try {
enoughPeriodsPerWeek(c);
} catch (classscheduling.ValidationException ve) {
}
if (errors.isEmpty()) {
result = fillSlotWithNextAvailableCourse(slot);
}else {
fillSlot(slot, c);
}
return result;
} |
public final void run() {
nodeExtension.onThreadStart(this);
try {
doRun();
} catch (java.lang.InterruptedException e) {
com.hazelcast.util.EmptyStatement.ignore(e);
} catch (java.lang.Throwable t) {
com.hazelcast.instance.OutOfMemoryErrorDispatcher.inspectOutputMemoryError(t);
... | public final void run() {
nodeExtension.onThreadStart(this);
try {
doRun();
} catch (java.lang.Throwable t) {
com.hazelcast.instance.OutOfMemoryErrorDispatcher.inspectOutputMemoryError(t);
logger.severe(t);
} finally {
nodeExtension.onThreadStop(this);
}
} |
public boolean isEmpty(int[] userSelection, TicTacToeEnum curentFigure) {
int row = userSelection[0];
int col = userSelection[1];
if (((board[row][col]) != (TicTacToeEnum.EMPTY)) && ((board[row][col]) != curentFigure))
return false;
else
return true;
} | public boolean isEmpty(int[] userSelection) {
int row = userSelection[0];
int col = userSelection[1];
if ((board[row][col]) == (TicTacToeEnum.EMPTY))
return true;
else
return false;
} |
public void setScreenSize(int width, int height) {
this.requestedConstraints.widthType = net.drewke.tdme.gui.GUINode.RequestedConstraints.RequestedConstraintsType.PIXEL;
this.requestedConstraints.width = width;
this.requestedConstraints.heightType = net.drewke.tdme.gui.GUINode.RequestedConstraints.Requested... | public void setScreenSize(int width, int height) {
this.requestedConstraints.widthType = net.drewke.tdme.gui.GUINode.RequestedConstraints.RequestedConstraintsType.PIXEL;
this.requestedConstraints.width = width;
this.requestedConstraints.heightType = net.drewke.tdme.gui.GUINode.RequestedConstraints.Requested... |
public float getPriority() {
float proximity = 0;
double distance = getCurrentDistanceToStop();
proximity += java.lang.Math.max(0, (0.2F * ((float) (1 - (distance / 32000)))));
proximity += java.lang.Math.max(0, (0.8F * ((float) (1 - (distance / 3200)))));
proximity = java.lang.Math.max(proximity, 0... | public float getPriority() {
float proximity = 0;
double distance = 1;
proximity += java.lang.Math.max(0, (0.2F * ((float) (1 - (distance / 32000)))));
proximity += java.lang.Math.max(0, (0.8F * ((float) (1 - (distance / 3200)))));
proximity = java.lang.Math.max(proximity, 0);
return proximity;
... |
protected java.lang.Object openSession(in.hikev.commons.hibernate.base.HibernateManualTransactionFunc func) {
org.hibernate.Session session = in.hikev.commons.hibernate.base.HibernateDao.sessionFactory.openSession();
org.hibernate.Transaction transaction = session.beginTransaction();
java.lang.Object result... | protected java.lang.Object openSession(in.hikev.commons.hibernate.base.HibernateManualTransactionFunc func) {
org.hibernate.Session session = in.hikev.commons.hibernate.base.HibernateDao.sessionFactory.openSession();
org.hibernate.Transaction transaction = session.beginTransaction();
java.lang.Object result... |
public static final int[] createCanonicalZero(final int count) {
final int[] blue;
final int[] res;
int num;
if ((num = count) > 0) {
res = new int[count];
if ((--num) > 0) {
blue = org.optimizationBenchmarking.utils.math.combinatorics.CanonicalPermutation.__blueprint(num);
... | public static final int[] createCanonicalZero(final int count) {
final int[] blue;
final int[] res;
int num;
if ((num = count) > 0) {
res = new int[count];
if ((--num) > 0) {
blue = org.optimizationBenchmarking.utils.math.combinatorics.CanonicalPermutation.__blueprint(num);
... |
public void handle(org.fenixedu.cms.domain.Page page, org.fenixedu.cms.rendering.TemplateContext componentContext, org.fenixedu.cms.rendering.TemplateContext globalContext) {
org.fenixedu.academic.domain.SchoolClass schoolClass = pt.ist.fenixframework.FenixFramework.getDomainObject(globalContext.getRequestContext()... | public void handle(org.fenixedu.cms.domain.Page page, org.fenixedu.cms.rendering.TemplateContext componentContext, org.fenixedu.cms.rendering.TemplateContext globalContext) {
org.fenixedu.academic.domain.SchoolClass schoolClass = pt.ist.fenixframework.FenixFramework.getDomainObject(globalContext.getRequestContext()... |
private void handlePushPostCompleted(org.wordpress.android.fluxc.store.PostStore.RemotePostPayload payload) {
if (payload.isError()) {
org.wordpress.android.fluxc.store.PostStore.OnPostUploaded onPostUploaded = new org.wordpress.android.fluxc.store.PostStore.OnPostUploaded(payload.post);
onPostUploa... | private void handlePushPostCompleted(org.wordpress.android.fluxc.store.PostStore.RemotePostPayload payload) {
if (payload.isError()) {
org.wordpress.android.fluxc.store.PostStore.OnPostUploaded onPostUploaded = new org.wordpress.android.fluxc.store.PostStore.OnPostUploaded(payload.post);
onPostUploa... |
public static okhttp3.Interceptor getLoggingIntercaptor() {
if (true)
return null;
com.ihsanbal.logging.LoggingInterceptor.Builder loggingInterceptor = new com.ihsanbal.logging.LoggingInterceptor.Builder();
loggingInterceptor.loggable(true).setLevel(Level.BASIC).log(Platform.INFO).request("Requ... | public static okhttp3.Interceptor getLoggingIntercaptor() {
com.ihsanbal.logging.LoggingInterceptor.Builder loggingInterceptor = new com.ihsanbal.logging.LoggingInterceptor.Builder();
loggingInterceptor.loggable(true).setLevel(Level.BASIC).log(Platform.INFO).request("Request").response("Response").addHeader("ve... |
public io.repseq.core.Chains merge(io.repseq.core.Chains other) {
if (((chains) == null) || ((other.chains) == null))
return io.repseq.core.Chains.ALL;
java.util.HashSet<java.lang.String> s = new java.util.HashSet<>();
s.addAll(this.chains);
s.addAll(other.chains);
return new io.repseq.... | public io.repseq.core.Chains merge(io.repseq.core.Chains other) {
if (((chains) == null) || ((other.chains) == null))
return io.repseq.core.Chains.ALL;
if (other.chains.equals(this.chains))
return this;
java.util.HashSet<java.lang.String> s = new java.util.HashSet<>();
s.addAll... |
public static yaplstack.ast.AST fn(java.lang.String[] params, int variableCount, yaplstack.ast.AST code) {
return new yaplstack.ast.AST() {
@java.lang.Override
public <T> T accept(yaplstack.ast.AST.Visitor<T> visitor) {
return visitor.visitFN(java.util.Arrays.asList(params), code);
... | public static yaplstack.ast.AST fn(java.lang.String[] params, yaplstack.ast.AST code) {
return new yaplstack.ast.AST() {
@java.lang.Override
public <T> T accept(yaplstack.ast.AST.Visitor<T> visitor) {
return visitor.visitFN(java.util.Arrays.asList(params), code);
}
};
} |
public void socialize(int hrs) {
Student.setStress(((Student.getStress()) - (hrs * 5)));
Student.setEnergy(((Student.getEnergy()) - (hrs * 4)));
} | public void socialize(int hrs) {
Student.setStress(((Student.getStress()) - (hrs * 5)));
Student.setEnergy(((Student.getEnergy()) - (hrs * 4)));
Student.time += hrs;
} |
public boolean addNewMember(java.lang.String Id, java.lang.String email) {
boolean added = false;
if (email.isEmpty()) {
com.tddair.Member m = new com.tddair.Member(Id, email);
if (m != null) {
if ((getById(Id)) == null) {
members.add(m);
added = true;... | public boolean addNewMember(java.lang.String Id, java.lang.String email) {
boolean added = false;
if (!(email.isEmpty())) {
com.tddair.Member m = new com.tddair.Member(Id, email);
if (m != null) {
if ((getById(Id)) == null) {
members.add(m);
added = tr... |
private void centerOnScreen() {
java.awt.Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
int w = this.getSize().width;
int h = this.getSize().height;
int x = ((dim.width) - w) / 2;
int y = ((dim.height) - h) / 2;
this.setLocationRelativeTo(null);
this.setLocationRelativ... | private void centerOnScreen() {
java.awt.Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
int w = this.getSize().width;
int h = this.getSize().height;
int x = ((dim.width) - w) / 2;
int y = ((dim.height) - h) / 2;
this.setLocationRelativeTo(null);
this.setLocationRelativ... |
public void releaseSlot() {
user_interface.account.content.fight.list.SnakePlayerList.getInstance().getList().add(currentPlayer);
user_interface.account.content.fight.list.SnakePlayerList.getInstance().resize();
user_interface.account.content.fight.list.SnakeViewerPane.getInstance().show(user_interface.acco... | public void releaseSlot() {
if (!(currentPlayer.equals(SnakePlayer.DEFAULT_SNAKE_PLAYER)))
user_interface.account.content.fight.list.SnakePlayerList.getInstance().getList().add(currentPlayer);
user_interface.account.content.fight.list.SnakePlayerList.getInstance().resize();
user_interface.accou... |
public void show() {
Gdx.input.setInputProcessor(stage);
if (nmu.isServer()) {
new com.technohest.core.network.RServer(nmu.getPort());
client = new com.technohest.core.network.RClient(nmu.getPort());
client.addEventListener(screenHandler);
}else {
new com.technohest.core.netw... | public void show() {
Gdx.input.setInputProcessor(stage);
if (nmu.isServer()) {
new com.technohest.core.network.RServer(nmu.getPort());
client = new com.technohest.core.network.RClient(nmu.getPort());
client.addEventListener(screenHandler);
}else {
client = new com.technohest.... |
public void changeTheme(java.lang.String styleSheet) {
_taskViewInterface.changeTheme(styleSheet);
_descriptionComponent.changeTheme(styleSheet);
_detailComponent.changeTheme(styleSheet);
_floatingBarComponent.changeTheme(styleSheet);
_floatingViewInterface.changeTheme(styleSheet);
_searchViewIn... | public boolean changeTheme(java.lang.String styleSheet) {
_taskViewInterface.changeTheme(styleSheet);
_descriptionComponent.changeTheme(styleSheet);
_detailComponent.changeTheme(styleSheet);
_floatingBarComponent.changeTheme(styleSheet);
_floatingViewInterface.changeTheme(styleSheet);
_searchVie... |
public static java.util.List<java.lang.String> getSourceRootPathList(com.intellij.openapi.project.Project project, com.intellij.openapi.actionSystem.AnActionEvent event) {
java.util.List<java.lang.String> sourceRoots = com.google.common.collect.Lists.newArrayList();
java.lang.String projectPath = org.apache.vel... | public static java.util.List<java.lang.String> getSourceRootPathList(com.intellij.openapi.project.Project project, com.intellij.openapi.actionSystem.AnActionEvent event) {
java.util.List<java.lang.String> sourceRoots = new java.util.ArrayList<>();
java.lang.String projectPath = org.apache.velocity.util.StringUt... |
public void testInitFromGpConfig_queue_and_virtualQueue() throws java.lang.Exception {
final org.genepattern.server.config.GpConfig gpConfig = new org.genepattern.server.config.GpConfig.Builder().addProperty(JobRunner.PROP_QUEUE, "my_queue").addProperty(JobRunner.PROP_VIRTUAL_QUEUE, "my_virtual_queue").build();
... | public void testInitFromGpConfig_queue_and_virtualQueue() throws java.lang.Exception {
final org.genepattern.server.config.GpConfig gpConfig = new org.genepattern.server.config.GpConfig.Builder().addProperty(JobRunner.PROP_QUEUE, "my_queue").addProperty(JobRunner.PROP_VIRTUAL_QUEUE, "my_virtual_queue").build();
... |
static org.bouncycastle.tsp.TimeStampToken addSignerCertificate(org.bouncycastle.tsp.TimeStampResponse tsResponse, java.security.cert.X509Certificate signerCertificate) throws java.lang.Exception {
org.bouncycastle.cms.CMSSignedData cms = tsResponse.getTimeStampToken().toCMSSignedData();
java.util.List<java.sec... | static org.bouncycastle.tsp.TimeStampToken addSignerCertificate(org.bouncycastle.tsp.TimeStampResponse tsResponse, java.security.cert.X509Certificate signerCertificate) throws java.lang.Exception {
org.bouncycastle.cms.CMSSignedData cms = tsResponse.getTimeStampToken().toCMSSignedData();
java.util.List<java.sec... |
public javalearn.Complex add(javalearn.Complex other) {
if (other == null) {
other = new javalearn.Complex(0, 0);
}
javalearn.Complex result = new javalearn.Complex(((this.real) + (other.real)), ((this.image) + (other.image)));
return result;
} | public javalearn.Complex add(javalearn.Complex other) {
if (other == null) {
other = new javalearn.Complex();
}
javalearn.Complex result = new javalearn.Complex(((this.real) + (other.real)), ((this.image) + (other.image)));
return result;
} |
public void unlinkStudentCourse_nominal() throws cst338.p1.EntityDuplicateException, cst338.p1.EntityNotFoundException {
cst338.p1.Database db = new cst338.p1.Database();
linkStudentCourse_nominal_core(db);
db.unlinkStudentCourse(1000, 2000);
java.util.List<cst338.p1.StudentRecord> courseStudents = db.g... | public void unlinkStudentCourse_nominal() throws cst338.p1.EntityDuplicateException, cst338.p1.EntityNotFoundException {
cst338.p1.Database db = new cst338.p1.Database();
linkStudentCourse_nominal_core(db);
db.unlinkStudentCourse(1000, 2000);
java.util.List<cst338.p1.StudentRecord> courseStudents = db.g... |
public boolean isEmpty() {
lockfree_set.Node<T> helper = head;
do {
helper = helper.next.getReference();
if (!(helper.next.isMarked())) {
return true;
}
if (helper == (tail)) {
break;
}
} while (true );
return false;
} | public boolean isEmpty() {
lockfree_set.Node<T> helper = head;
do {
helper = helper.next.getReference();
if (helper == (tail)) {
break;
}
if (!(helper.next.isMarked())) {
return false;
}
} while (true );
return true;
} |
public boolean preCall(io.netty.handler.codec.http.HttpRequest request, org.wso2.carbon.mss.HttpResponder responder, org.wso2.carbon.mss.internal.router.HandlerInfo handlerInfo) {
log.info("Processing JWT ..");
io.netty.handler.codec.http.HttpHeaders headers = request.headers();
boolean isValidSignature = f... | public boolean preCall(io.netty.handler.codec.http.HttpRequest request, org.wso2.carbon.mss.HttpResponder responder, org.wso2.carbon.mss.internal.router.HandlerInfo handlerInfo) {
io.netty.handler.codec.http.HttpHeaders headers = request.headers();
boolean isValidSignature = false;
if (headers != null) {
... |
public java.lang.String getFormatedTime() {
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("h:mm a");
formatter.setTimeZone(java.util.TimeZone.getTimeZone(mTimeZone));
java.util.Date dateTime = new java.util.Date(((getTime()) * 1000));
java.lang.String timeString = formatter.forma... | public java.lang.String getFormatedTime() {
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("h:mm a");
formatter.setTimeZone(java.util.TimeZone.getTimeZone(mTimeZone));
java.util.Date dateTime = new java.util.Date(((getTime()) * 1000));
return formatter.format(dateTime);
} |
public void onNewIntent(android.content.Intent intent) {
if (((intent != null) && ((intent.getExtras()) != null)) && ((intent.getExtras().getString("nid")) != null)) {
com.vidinoti.android.vdarsdk.VDARSDKController.getInstance().processNotification(intent.getExtras().getString("nid"), intent.getExtras().get... | public void onNewIntent(android.content.Intent intent) {
if ((((intent != null) && ((intent.getExtras()) != null)) && ((intent.getExtras().getString("nid")) != null)) && ((com.vidinoti.android.vdarsdk.VDARSDKController.getInstance()) != null)) {
com.vidinoti.android.vdarsdk.VDARSDKController.getInstance().p... |
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
android.util.Log.e(com.fenix.audioplayer.MainActivity.TEST, "Check2");
if (resultCode == (RESULT_OK)) {
switch (requestCode) {
case com.fenix.audioplayer.MainActivity.REQUEST_FOLDER :
... | protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (resultCode == (RESULT_OK)) {
switch (requestCode) {
case com.fenix.audioplayer.MainActivity.REQUEST_FOLDER :
com.fenix.audioplayer.MainActivity.sPath = data.getStringExtra(com.feni... |
public com.shadowmydx.sql.interpreter.parser.MatchNode execute(com.shadowmydx.sql.interpreter.parser.MatchNode root, com.shadowmydx.sql.interpreter.environment.SQLEnvironment env, java.util.List<java.lang.Object> childrenResult) {
com.shadowmydx.sql.interpreter.parser.MatchNode start = root;
com.shadowmydx.sql.... | public com.shadowmydx.sql.interpreter.parser.MatchNode execute(com.shadowmydx.sql.interpreter.parser.MatchNode root, com.shadowmydx.sql.interpreter.environment.SQLEnvironment env, java.util.List<java.lang.Object> childrenResult) {
com.shadowmydx.sql.interpreter.parser.MatchNode start = root;
com.shadowmydx.sql.... |
public void testConstructor() {
final long time = java.lang.System.currentTimeMillis();
final org.onosproject.net.flowext.FlowRuleExtEntry flowRule = new org.onosproject.net.flowext.FlowRuleExtEntry(org.onosproject.net.DeviceId.deviceId("of:123456"), "of:123456".getBytes());
final org.onosproject.net.flowex... | public void testConstructor() {
final long time = java.lang.System.currentTimeMillis();
final org.onosproject.net.flowext.FlowRuleExtEntry flowRule = new org.onosproject.net.flowext.FlowRuleExtEntry(org.onosproject.net.DeviceId.deviceId("of:123456"), null, "of:123456".getBytes());
final org.onosproject.net.... |
private void initViews() {
etUsername = ((android.widget.EditText) (findViewById(R.id.etEmail)));
etPassword = ((android.widget.EditText) (findViewById(R.id.etPassword)));
btnLogin = ((android.widget.Button) (findViewById(R.id.btnLogin)));
tbSync = ((android.widget.ToggleButton) (findViewById(R.id.tbSyn... | private void initViews() {
etUsername = ((android.widget.EditText) (findViewById(R.id.etEmail)));
etPassword = ((android.widget.EditText) (findViewById(R.id.etPassword)));
btnLogin = ((android.widget.Button) (findViewById(R.id.btnLogin)));
tbSync = ((android.widget.ToggleButton) (findViewById(R.id.tbSyn... |
private void load() throws java.io.IOException, nami.connector.exception.NamiApiException {
long startTimeInMillis = java.lang.System.currentTimeMillis();
java.util.Collection<nami.connector.namitypes.NamiMitgliedListElement> result = namiSearchedValues.getAllResults(connector);
int i = 0;
int items = r... | private void load() throws java.io.IOException, nami.connector.exception.NamiApiException {
long startTimeInMillis = java.lang.System.currentTimeMillis();
java.util.Collection<nami.connector.namitypes.NamiMitgliedListElement> result = namiSearchedValues.getAllResults(connector);
int i = 0;
int items = r... |
public void run() {
com.phicdy.mycuration.rss.RssParser parser = new com.phicdy.mycuration.rss.RssParser(context);
parser.parseXml(in, feedId);
new com.phicdy.mycuration.filter.FilterTask(context).applyFiltering(feedId);
try {
in.close();
} catch (java.io.IOException e) {
e.printStac... | public void run() {
com.phicdy.mycuration.rss.RssParser parser = new com.phicdy.mycuration.rss.RssParser(context);
parser.parseXml(in, feedId);
new com.phicdy.mycuration.filter.FilterTask(context).applyFiltering(feedId);
try {
in.close();
} catch (java.io.IOException e) {
e.printStac... |
private void handleReloading(dk.gruppeseks.bodtrd.common.data.entityelements.Weapon wep) {
if (wep.isReloading()) {
int currentAmmunition = wep.getCurrentAmmunition();
int removedAmmunition = java.lang.Math.min(currentAmmunition, wep.getMaxMagazineSize());
wep.setCurrentAmmunition(((currentA... | private void handleReloading(dk.gruppeseks.bodtrd.common.data.entityelements.Weapon wep) {
if (wep.isReloading()) {
wep.setReloading(false);
int currentAmmunition = wep.getCurrentAmmunition();
int removedAmmunition = java.lang.Math.min(currentAmmunition, wep.getMaxMagazineSize());
we... |
public static com.eclubprague.cardashboard.tablet.fragments.SimplePageFragment newInstance(java.util.List<com.eclubprague.cardashboard.core.modules.base.IModule> modules, int rowCount, int columnCount) {
android.util.Log.d(com.eclubprague.cardashboard.tablet.fragments.SimplePageFragment.TAG, "recreating fragment: n... | public static com.eclubprague.cardashboard.tablet.fragments.SimplePageFragment newInstance(java.util.List<com.eclubprague.cardashboard.core.modules.base.IModule> modules, int rowCount, int columnCount) {
com.eclubprague.cardashboard.tablet.fragments.SimplePageFragment fragment = new com.eclubprague.cardashboard.tab... |
public void mark(int col, int row) {
if (((utility) == (-1)) && ((getValue(col, row)) == (cs572_lab2.ReversiState.EMPTY))) {
board[getAbsPosition(col, row)] = playerToMove;
flipPieces(col, row);
analyzeUtility();
playerToMove = ((playerToMove) == (cs572_lab2.ReversiState.X)) ? cs572_... | public void mark(int col, int row) {
if (((utility) == (-1)) && ((getValue(col, row)) == (cs572_lab2.ReversiState.EMPTY))) {
board[getAbsPosition(col, row)] = playerToMove;
flipPieces(col, row);
playerToMove = ((playerToMove) == (cs572_lab2.ReversiState.X)) ? cs572_lab2.ReversiState.O : cs57... |
public boolean onKey(android.view.View v, int keyCode, android.view.KeyEvent event) {
if (keyCode == (android.view.KeyEvent.KEYCODE_BACK)) {
if (systems.eddon.android.zoo_keeper.ZooGate.myActivity.getLocalClassName().matches("Notify")) {
systems.eddon.android.zoo_keeper.ZooGate z = ((systems.edd... | public boolean onKey(android.view.View v, int keyCode, android.view.KeyEvent event) {
if (keyCode == (android.view.KeyEvent.KEYCODE_BACK)) {
if (!(systems.eddon.android.zoo_keeper.ZooGate.myActivity.getLocalClassName().matches("Notify"))) {
systems.eddon.android.zoo_keeper.ZooGate z = ((systems.... |
public static void main(java.lang.String[] args) {
core.Graph.exportCleanJSON();
control.Main.markovController = new control.MarkovController();
control.Main.sensorCollector = new communications.SensorCollector(control.Main.props.getAnomalyPathsValue());
control.Main.markovController.parse("IDAtaque=1;T... | public static void main(java.lang.String[] args) {
core.Graph.exportCleanJSON();
control.Main.markovController = new control.MarkovController();
control.Main.sensorCollector = new communications.SensorCollector(control.Main.props.getAnomalyPathsValue());
new java.lang.Thread(control.Main.sensorCollector... |
public int RollDice() throws shared.model.ModelException {
if ((gameState.state) != (shared.definitions.GameRound.ROLLING))
throw new shared.model.ModelException("Game isn't in rolling state");
java.util.Random randomGen = new java.util.Random();
int diceRoll = ((randomGen.nextInt(5)) + (random... | public int RollDice() throws shared.model.ModelException {
if ((gameState.state) != (shared.definitions.GameRound.ROLLING))
throw new shared.model.ModelException("Game isn't in rolling state");
java.util.Random randomGen = new java.util.Random();
int diceRoll = ((randomGen.nextInt(5)) + (random... |
public boolean onLongPressOnMap(android.graphics.Point point) {
com.my.fly.utilities.WayPoint wayPoint = new com.my.fly.utilities.WayPoint(routeView.TranslateScreenPointToGeoPoint(point));
route.AddWayPoint(wayPoint);
routeView.AddWayPoint(wayPoint, route.GetWayPoints().size());
routeView.SetViewPoint(r... | public boolean onLongPressOnMap(android.graphics.Point point) {
com.my.fly.utilities.WayPoint wayPoint = new com.my.fly.utilities.WayPoint(routeView.TranslateScreenPointToGeoPoint(point));
route.AddWayPoint(wayPoint);
routeView.AddWayPoint(wayPoint, ((route.GetWayPoints().size()) - 1));
routeView.SetVie... |
public void preinit(net.minecraftforge.fml.common.event.FMLPreInitializationEvent event) {
com.himself12794.powersapi.network.PowersNetwork.init(NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MODID));
com.himself12794.powersapi.network.PowersNetwork.registerMessages();
if (com.himself12794.powersapi.co... | public void preinit(net.minecraftforge.fml.common.event.FMLPreInitializationEvent event) {
com.himself12794.powersapi.network.PowersNetwork.init(NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MODID));
com.himself12794.powersapi.network.PowersNetwork.registerMessages();
if (com.himself12794.powersapi.co... |
public static java.util.List<classified.classifiedbuzzmovieselector.model.UserRating> getUserRatingsByFriends(classified.classifiedbuzzmovieselector.model.User user, java.util.List<classified.classifiedbuzzmovieselector.model.UserRating> ratingList) {
java.util.List<classified.classifiedbuzzmovieselector.model.User... | public static java.util.List<classified.classifiedbuzzmovieselector.model.UserRating> getUserRatingsByFriends(classified.classifiedbuzzmovieselector.model.User user, java.util.List<classified.classifiedbuzzmovieselector.model.UserRating> ratingList) {
java.util.List<classified.classifiedbuzzmovieselector.model.User... |
public void handle(long now) {
long updateLength = now - (lastLoopTime);
lastLoopTime = now;
lastFpsTime += updateLength;
(fps)++;
if ((lastFpsTime) >= (gamelogic.GameLoop.NANOS_PER_SECOND)) {
java.lang.System.out.println((("(FPS: " + (fps)) + ")"));
lastFpsTime = 0;
currFps ... | public void handle(long now) {
long updateLength = now - (lastLoopTime);
lastLoopTime = now;
lastFpsTime += updateLength;
(fps)++;
if ((lastFpsTime) >= (gamelogic.GameLoop.NANOS_PER_SECOND)) {
lastFpsTime = 0;
currFps = fps;
fps = 0;
}
gameComponent.update(updateLengt... |
public void solve2() {
for (int r = 0; r <= ((rows) / 2); r++) {
for (int c = 0; c <= ((rows) / 2); c++) {
boolean didItWork = solveBetter(r, c, 1);
if (didItWork)
return ;
this.clear();
}
}
} | public void solve2() {
this.clear();
for (int r = 0; r <= ((rows) / 2); r++) {
for (int c = 0; c <= ((rows) / 2); c++) {
boolean didItWork = solveBetter(r, c, 1);
if (didItWork)
return ;
this.clear();
}
}
} |
public void onDismiss(android.content.DialogInterface dialog) {
if (org.catrobat.catroid.ProjectManager.getInstance().getComingFromScriptFragmentToSoundFragment()) {
org.catrobat.catroid.ProjectManager.getInstance().setComingFromScriptFragmentToSoundFragment(false);
if (!(isAddNewSoundButtonClicked)... | public void onDismiss(android.content.DialogInterface dialog) {
if ((org.catrobat.catroid.ProjectManager.getInstance().getComingFromScriptFragmentToSoundFragment()) && (!(isAddNewSoundButtonClicked))) {
org.catrobat.catroid.ProjectManager.getInstance().setComingFromScriptFragmentToSoundFragment(false);
... |
private org.hawk.modelio.exml.metamodel.MPackage createMetaPackage() {
java.lang.String pkgId = "ModelioMetaPackage";
org.hawk.modelio.exml.metamodel.MPackage mpkg = new org.hawk.modelio.exml.metamodel.MPackage(((pkgId + ".") + (java.util.UUID.randomUUID())), pkgId, "00.00.00", "");
final org.hawk.modelio.e... | private org.hawk.modelio.exml.metamodel.MPackage createMetaPackage() {
java.lang.String pkgId = "ModelioMetaPackage";
org.hawk.modelio.exml.metamodel.MPackage mpkg = new org.hawk.modelio.exml.metamodel.MPackage(pkgId, pkgId, "00.00.00", "");
final org.hawk.modelio.exml.metamodel.MClass mt = new org.hawk.mod... |
public void testReplaceExistingFunction() throws java.lang.Exception {
io.crate.operation.udf.UserDefinedFunctionsMetaData metaData = io.crate.operation.udf.UserDefinedFunctionService.putFunction(io.crate.operation.udf.UserDefinedFunctionsMetaData.of(same1), same2, true);
assertThat(metaData.functionsMetaData()... | public void testReplaceExistingFunction() throws java.lang.Exception {
io.crate.operation.udf.UserDefinedFunctionsMetaData metaData = putFunction(io.crate.operation.udf.UserDefinedFunctionsMetaData.of(same1), same2, true);
assertThat(metaData.functionsMetaData(), hasSize(1));
assertThat(metaData.functionsMe... |
public com.github.pagehelper.PageInfo<cn.edu.nju.software.entity.Works> getWorksListByStoryIdListByPage(java.util.List<java.lang.Integer> storyIdList, int page, int pageSize) {
com.github.pagehelper.PageHelper.startPage((page + 1), pageSize);
storyIdList.add((-1));
java.util.List<cn.edu.nju.software.entity.... | public com.github.pagehelper.PageInfo<cn.edu.nju.software.entity.Works> getWorksListByStoryIdListByPage(java.util.List<java.lang.Integer> storyIdList, int page, int pageSize) {
com.github.pagehelper.PageHelper.startPage(page, pageSize);
storyIdList.add((-1));
java.util.List<cn.edu.nju.software.entity.Works>... |
public void writeInTextFile(java.lang.String playerInfo, int fileNumber) {
java.lang.String filePath = java.lang.String.format((("resources\\PlayerFiles\\" + fileNumber) + ".txt"));
try {
java.io.PrintWriter writer;
writer = new java.io.PrintWriter(filePath);
writer.print(playerInfo);
... | public void writeInTextFile(java.lang.String playerInfo, int fileNumber) {
java.lang.String filePath = ("resources\\PlayerFiles\\" + fileNumber) + ".txt";
try {
java.io.PrintWriter writer;
writer = new java.io.PrintWriter(filePath);
writer.print(playerInfo);
writer.close();
}... |
public int getPlayerForBoard(final java.lang.String playerFigure) {
int playerBoardCount = 0;
for (int i = 0; i < (board.getFiguresArray().length); i++) {
playerBoardCount += getPlayerForLine(i, playerFigure);
}
return playerBoardCount;
} | private int getPlayerForBoard(final java.lang.String playerFigure) {
int playerBoardCount = 0;
for (int i = 0; i < (board.getFiguresArray().length); i++) {
playerBoardCount += getPlayerForLine(i, playerFigure);
}
return playerBoardCount;
} |
public boolean attachTo(com.shatteredpixel.shatteredpixeldungeon.actors.Char target) {
spend(charge);
((com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero) (target)).spendAndNext(charge);
com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger hunger = target.buff(com.shatteredpixel.shatteredpix... | public boolean attachTo(com.shatteredpixel.shatteredpixeldungeon.actors.Char target) {
spend(((charge) - 1));
((com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero) (target)).spendAndNext(charge);
com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger hunger = target.buff(com.shatteredpixel.shat... |
public void run() {
clickHandled = true;
comm.setLongClickable(true);
handler.removeCallbacksAndMessages(null);
if ((((link) != null) && ((link.length) > 0)) && ((link[0]) != null))
this.clickableText.onLinkLongClick(link[0].getURL());
} | public void run() {
clickHandled = true;
handler.removeCallbacksAndMessages(null);
if ((((link) != null) && ((link.length) > 0)) && ((link[0]) != null))
this.clickableText.onLinkLongClick(link[0].getURL());
} |
public void testTreeCreation() throws java.lang.Exception {
CAS.Equation test1 = builder.makeEquation("ADD ( 4 , 5 )");
CAS.Tree<CAS.EquationObjects.MathObject> expectedTree1 = new CAS.Tree(new CAS.EquationObjects.MathObject(CAS.EquationObjects.MathOperator.ADD));
expectedTree1.addChildWithData(new CAS.Equa... | public void testTreeCreation() throws java.lang.Exception {
CAS.Equation test1 = builder.makeEquation("ADD ( 4 , 5 )", 0);
CAS.Tree<CAS.EquationObjects.MathObject> expectedTree1 = new CAS.Tree(new CAS.EquationObjects.MathObject(CAS.EquationObjects.MathOperator.ADD));
expectedTree1.addChildWithData(new CAS.E... |
public boolean onItemLongClick(android.widget.AdapterView<?> arg0, android.view.View arg1, int pos, long id) {
android.content.Intent intent = new android.content.Intent(this, pt.lsts.alvii.DisplayGraph.class);
android.os.Bundle b = new android.os.Bundle();
b.putString("BUNDLE_INDEX_PATH", m_file_path_index... | public boolean onItemLongClick(android.widget.AdapterView<?> arg0, android.view.View arg1, int pos, long id) {
android.content.Intent intent = new android.content.Intent(this, pt.lsts.alvii.DisplayGraph.class);
android.os.Bundle b = new android.os.Bundle();
b.putString("BUNDLE_INDEX_PATH", m_file_path_index... |
java.lang.String[] result = new java.lang.String[data.length];
for (int i = 0; i < (data.length); i++) {
result[i] = data[i].replace(placeholder, sep);
}
return result;
} | private static java.lang.String[] getDataForSeparator(char placeholder, char sep, java.lang.String[] data) {
java.lang.String[] result = new java.lang.String[data.length];
for (int i = 0; i < (data.length); i++) {
result[i] = data[i].replace(placeholder, sep);
}
return result;
} |
public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception {
javafx.scene.Parent root = javafx.fxml.FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("File Transfer");
primaryStage.setScene(new javafx.scene.Scene(root, 800, 600));
primaryStage.show();
p... | public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception {
new java.lang.Thread(new sample.Server(2020)).start();
new java.lang.Thread(new sample.Server(2021)).start();
javafx.scene.Parent root = javafx.fxml.FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTit... |
public void update() {
position.x -= (speed) * (Gdx.graphics.getDeltaTime());
if ((position.x) < (-(dimension.x))) {
position = startingPosition;
}
updateHitBox();
} | public void update() {
position.x -= (speed) * (Gdx.graphics.getDeltaTime());
if ((position.x) < (-(dimension.x))) {
position.x = startingPosition.x;
}
updateHitBox();
} |
public void onSaveInstanceState(android.os.Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString("leadId", leadId);
outState.putString("selCategory", selCategory);
outState.putString("selSubCategory", selSubCategory);
outState.putStringArrayList("selIdProofList", selIdProofList)... | public void onSaveInstanceState(android.os.Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString("leadId", leadId);
outState.putString("selCategory", selCategory);
outState.putString("selSubCategory", selSubCategory);
outState.putSerializable(Utils.KEY_LEAD_DATA, leadInfoModel);... |
public void testMovingIntoVirtualSpace() throws java.lang.Exception {
prepareText("R");
myEditor.getSettings().setVirtualSpace(true);
com.intellij.openapi.editor.impl.EditorRtlTest.assertVisualCaretLocation(0, false);
right();
com.intellij.openapi.editor.impl.EditorRtlTest.assertVisualCaretLocation(... | public void testMovingIntoVirtualSpace() throws java.lang.Exception {
prepareText("R");
myEditor.getSettings().setVirtualSpace(true);
assertVisualCaretLocation(0, false);
right();
assertVisualCaretLocation(0, true);
right();
assertVisualCaretLocation(1, true);
right();
assertVisualCa... |
public synchronized void sendMessageWithValue(int node, int type, int value) {
network.sendMessage(node, new algo.ftsta.message.Message(this.nodeID, type, this.currSN, value, lc));
if (((type != (algo.ftsta.message.Message.E_ACCEPT)) && (type != (algo.ftsta.message.Message.E_PROPOSE))) && (type != (algo.ftsta.m... | public synchronized void sendMessageWithValue(int node, int type, int value) {
network.sendMessage(node, new algo.ftsta.message.Message(this.nodeID, type, this.currSN, new java.lang.Integer(value), lc));
if (((type != (algo.ftsta.message.Message.E_ACCEPT)) && (type != (algo.ftsta.message.Message.E_PROPOSE))) &&... |
private void setScoresFromJSON(edu.uncc.cs.watsonsim.Passage p, java.lang.String json) {
org.json.simple.JSONObject jo = ((org.json.simple.JSONObject) (org.json.simple.JSONValue.parse(json)));
for (java.lang.Object o : jo.entrySet()) {
java.util.Map.Entry<java.lang.String, java.lang.Double> entry = ((ja... | private void setScoresFromJSON(edu.uncc.cs.watsonsim.Passage p, java.lang.String json) {
org.json.simple.JSONObject jo = ((org.json.simple.JSONObject) (org.json.simple.JSONValue.parse(json)));
for (java.lang.Object o : jo.entrySet()) {
java.util.Map.Entry<java.lang.String, java.lang.Double> entry = ((ja... |
public org.springframework.http.ResponseEntity<java.lang.Object> importOdmToOC(@org.springframework.web.bind.annotation.RequestBody
org.akaza.openclinica.controller.ODM odm, @org.springframework.web.bind.annotation.PathVariable(value = "boardId")
java.lang.String boardId) throws java.lang.Exception {
try {
... | public org.springframework.http.ResponseEntity<java.lang.Object> importOdmToOC(@org.springframework.web.bind.annotation.RequestBody
org.akaza.openclinica.controller.ODM odm, @org.springframework.web.bind.annotation.PathVariable(value = "boardId")
java.lang.String boardId) throws java.lang.Exception {
try {
... |
public java.lang.Object doInBackground(java.lang.Object[] params) {
java.lang.String netID = getIntent().getStringExtra("netID");
java.lang.String password = getIntent().getStringExtra("password");
edu.byu.dtaylor.homeworknotifier.gsontools.GsonDatabase gsonDb = edu.byu.dtaylor.homeworknotifier.Utils.getAll... | public java.lang.Object doInBackground(java.lang.Object[] params) {
java.lang.String netID = getIntent().getStringExtra("netID");
java.lang.String password = getIntent().getStringExtra("password");
edu.byu.dtaylor.homeworknotifier.gsontools.GsonDatabase gsonDb = edu.byu.dtaylor.homeworknotifier.Utils.getAll... |
private int countChar(java.lang.String str, char c) {
int counter = 0;
for (int i = 0; i <= (str.length()); i++) {
if ((str.charAt(i)) == c)
counter++;
}
return counter;
} | private int countChar(java.lang.String str, char c) {
int counter = 0;
for (int i = 0; i <= ((str.length()) - 1); i++) {
if ((str.charAt(i)) == c)
counter++;
}
return counter;
} |
public static boolean isDigitOrString(java.lang.String string) {
java.lang.String pattern1 = "\\d+";
java.lang.String pattern2 = "^\"\\w*\"$";
java.lang.String pattern3 = "\\w*";
if (((java.util.regex.Pattern.matches(pattern1, string)) || (java.util.regex.Pattern.matches(pattern2, string))) || (java.uti... | public static boolean isDigitOrString(java.lang.String string) {
java.lang.String pattern1 = "\\d+";
java.lang.String pattern2 = "^\"\\w*\"$";
java.lang.String pattern3 = "\\w*";
if (((java.util.regex.Pattern.matches(pattern1, string)) || (java.util.regex.Pattern.matches(pattern2, string))) || (java.uti... |
public void grow() {
java.lang.Object[] hold = new java.lang.Object[(circle.length) * 2];
for (int i = start; i < (end); i++) {
hold[(i - (start))] = circle[i];
}
} | public void grow() {
java.lang.Object[] hold = new java.lang.Object[(circle.length) * 2];
for (int i = start; i < (end); i++) {
hold[(i - (start))] = circle[i];
}
circle = hold;
} |
public static void main(java.lang.String[] args) throws java.io.IOException, java.lang.InterruptedException {
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.FileReader(new java.io.File("data.txt")));
java.util.ArrayList<java.lang.String> lines = new java.util.ArrayList<>();
while (re... | public static void main(java.lang.String[] args) throws java.io.IOException, java.lang.InterruptedException {
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.FileReader(new java.io.File("data.txt")));
java.util.Set<java.lang.String> lines = new java.util.HashSet<>();
while (reader.rea... |
public void saveActiveContext() {
org.eclipse.mylyn.internal.context.core.ContextCorePlugin.getContextStore().saveActiveContext();
org.eclipse.mylyn.tasks.core.ITask task = org.eclipse.mylyn.tasks.ui.TasksUi.getTaskActivityManager().getActiveTask();
stateHandler.saved(task);
final org.eclipse.mylyn.inte... | public void saveActiveContext() {
org.eclipse.mylyn.internal.context.core.ContextCorePlugin.getContextStore().saveActiveContext();
org.eclipse.mylyn.tasks.core.ITask task = org.eclipse.mylyn.tasks.ui.TasksUi.getTaskActivityManager().getActiveTask();
if (task != null) {
stateHandler.saved(task);
... |
public boolean isIgnored(at.siemens.ct.jmz.elements.constraints.Constraint constraint) {
java.lang.String group = constraint.getConstraintGroup();
java.lang.String name = constraint.getConstraintName();
return (ignoredGroups.contains(group)) || (ignoredKeys.contains(key(group, name)));
} | public boolean isIgnored(at.siemens.ct.jmz.elements.constraints.Constraint constraint) {
java.lang.String group = constraint.getConstraintGroup();
java.lang.String name = constraint.getConstraintName();
return ((group != null) && (name != null)) && ((ignoredGroups.contains(group)) || (ignoredKeys.contains(k... |
public void setSelectedRadio(java.lang.String selectedRadio) {
if (selectedRadio.equals(options.get(0))) {
firstOption.setChecked(true);
secondOption.setChecked(false);
}else {
firstOption.setChecked(false);
secondOption.setChecked(true);
}
} | public void setSelectedRadio(java.lang.String selectedRadio) {
if (selectedRadio.equals(options.get(0))) {
firstOption.setChecked(true);
secondOption.setChecked(false);
}else
if (selectedRadio.equals(options.get(1))) {
firstOption.setChecked(false);
secondOption.s... |
public org.springframework.http.ResponseEntity<?> deleteAnswer(@qasite.web.controller.PathVariable(value = "threadId")
java.lang.Long threadId, @qasite.web.controller.PathVariable(value = "answerId")
java.lang.Long answerId, @org.springframework.security.core.annotation.AuthenticationPrincipal
org.springframework.secur... | public org.springframework.http.ResponseEntity<?> deleteAnswer(@qasite.web.controller.PathVariable(value = "threadId")
java.lang.Long threadId, @qasite.web.controller.PathVariable(value = "answerId")
java.lang.Long answerId, @org.springframework.security.core.annotation.AuthenticationPrincipal
org.springframework.secur... |
public static java.nio.ByteBuffer enlargeBuffer(java.nio.ByteBuffer buffer, int proposedCapacity) {
if (proposedCapacity > (buffer.capacity())) {
buffer = java.nio.ByteBuffer.allocate(proposedCapacity);
}else {
buffer = java.nio.ByteBuffer.allocate(((buffer.capacity()) * 2));
}
return bu... | private static java.nio.ByteBuffer enlargeBuffer(java.nio.ByteBuffer buffer, int proposedCapacity) {
if (proposedCapacity > (buffer.capacity())) {
buffer = java.nio.ByteBuffer.allocate(proposedCapacity);
}else {
buffer = java.nio.ByteBuffer.allocate(((buffer.capacity()) * 2));
}
return b... |
public boolean canView(org.activityinfo.model.form.FormInstance record) {
org.activityinfo.store.spi.FormPermissions formPermissions = supervisor.getFormPermissions(record.getId());
if (!(formPermissions.isVisible())) {
return false;
}
org.activityinfo.model.expr.ExprNode filter = parseFilter(re... | public boolean canView(org.activityinfo.model.form.FormInstance record) {
org.activityinfo.store.spi.FormPermissions formPermissions = supervisor.getFormPermissions(record.getFormId());
if (!(formPermissions.isVisible())) {
return false;
}
org.activityinfo.model.expr.ExprNode filter = parseFilte... |
public boolean setFlashMode(@com.google.android.gms.samples.vision.barcodereader.ui.camera.CameraSource.FlashMode
java.lang.String mode) {
synchronized(mCameraLock) {
if (((mCamera) != null) && (mode != null)) {
android.hardware.Camera.Parameters parameters = mCamera.getParameters();
... | public boolean setFlashMode(@com.google.android.gms.samples.vision.barcodereader.ui.camera.CameraSource.FlashMode
java.lang.String mode) {
synchronized(mCameraLock) {
if (((mCamera) != null) && (mode != null)) {
android.hardware.Camera.Parameters parameters = mCamera.getParameters();
... |
public void updateRooms(java.util.List<org.Point> Rooms) {
RMOL.clear();
searchString = SearchField.getText();
if ((searchString) == "") {
RMOL.addAll(Rooms);
}else {
RMOL.addAll(database.fuzzySearchPoints(searchString));
}
RoomDirectory.setItems(RMOL);
} | public void updateRooms(java.util.List<org.Point> Rooms) {
RMOL.clear();
if (searchString.equals("")) {
RMOL.addAll(Rooms);
}else {
RMOL.addAll(database.fuzzySearchPoints(searchString));
}
RoomDirectory.setItems(RMOL);
} |
public static void sendMail(java.lang.String prefix, java.lang.String subject, java.lang.String body, pe.chalk.takoyaki.data.Member[] recipients) {
pe.chalk.takoyaki.utils.Mailer.send(java.lang.String.format("[%s] [%s] %s", pe.chalk.takoyaki.Takoyaki.getInstance().getPrefix(), prefix, subject), java.lang.String.for... | public static void sendMail(java.lang.String prefix, java.lang.String subject, java.lang.String body, java.lang.Object[] recipients) {
pe.chalk.takoyaki.utils.Mailer.send(java.lang.String.format("[%s] [%s] %s", pe.chalk.takoyaki.Takoyaki.getInstance().getPrefix(), prefix, subject), java.lang.String.format(pe.chalk.... |
private void loopClientClasses(org.json.JSONArray clientClasses, org.json.JSONObject eventJsonObject, org.json.JSONObject event, org.json.JSONObject client) throws java.lang.Exception {
for (int i = 0; i < (clientClasses.length()); i++) {
org.json.JSONObject object = clientClasses.getJSONObject(i);
... | private void loopClientClasses(org.json.JSONArray clientClasses, org.json.JSONObject event, org.json.JSONObject client) throws java.lang.Exception {
for (int i = 0; i < (clientClasses.length()); i++) {
org.json.JSONObject object = clientClasses.getJSONObject(i);
org.json.JSONObject ruleObject = obje... |
public boolean updatedMessages(java.util.Vector<sk.boinc.androboinc.clientconnection.MessageInfo> messages) {
mMessages = messages;
if (mViewUpdatesAllowed) {
if (sk.boinc.androboinc.debug.Logging.DEBUG)
android.util.Log.d(sk.boinc.androboinc.MessagesActivity.TAG, "Messages are updated, refr... | public boolean updatedMessages(java.util.Vector<sk.boinc.androboinc.clientconnection.MessageInfo> messages) {
if ((mMessages.size()) != (messages.size())) {
mMessages = messages;
if (mViewUpdatesAllowed) {
if (sk.boinc.androboinc.debug.Logging.DEBUG)
android.util.Log.d(sk... |
public static void writeBooksIntoCookie(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, long bookId, int previousQuantity) {
com.tsystems.javaschool.view.controllers.CartController.deleteExistingCookies(bookId, req);
javax.servlet.http.Cookie cookie = new javax.servlet.ht... | public static void writeBooksIntoCookie(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, long bookId, int previousQuantity) {
com.tsystems.javaschool.view.controllers.CartController.deleteExistingCookies(bookId, req, resp);
javax.servlet.http.Cookie cookie = new javax.serv... |
public static java.util.ArrayList<java.lang.String> jsonBookArrayToBookIdArrayList(com.google.gson.JsonArray jArray) {
java.util.ArrayList<java.lang.String> bookIds = new java.util.ArrayList<java.lang.String>();
for (int i = 0; i < (jArray.size()); i++) {
com.crowdshelf.app.models.Book book = new com.go... | public static java.util.ArrayList<java.lang.String> jsonBookArrayToBookIdArrayList(com.google.gson.JsonArray jArray) {
java.util.ArrayList<java.lang.String> bookIds = new java.util.ArrayList<java.lang.String>();
for (int i = 0; i < (jArray.size()); i++) {
com.crowdshelf.app.models.Book book = new com.go... |
public void add(E e, double p) throws java.lang.IllegalArgumentException {
if (map.containsKey(e)) {
throw new java.lang.IllegalArgumentException("e is already in priority queue");
}
b.add(e);
(size)++;
map.put(e, new MinHeap.EInfo(b.indexOf(e), p));
bubbleUp(b.indexOf(e));
} | public void add(E e, double p) throws java.lang.IllegalArgumentException {
if (map.containsKey(e)) {
throw new java.lang.IllegalArgumentException("e is already in priority queue");
}
b.add(e);
(size)++;
map.put(e, new MinHeap.EInfo(b.indexOf(e), p));
bubbleUp(((size) - 1));
} |
public static void main(java.lang.String[] args) {
net.net16.jeremiahlowe.fighters.Fighters.rng = new java.util.Random();
if (net.net16.jeremiahlowe.fighters.Fighters.DEBUG_MODE)
net.net16.jeremiahlowe.fighters.Fighters.rng.setSeed(0);
else
net.net16.jeremiahlowe.fighters.Fighters.rng.setSee... | public static void main(java.lang.String[] args) {
net.net16.jeremiahlowe.fighters.Fighters.rng = new java.util.Random();
if (net.net16.jeremiahlowe.fighters.Fighters.DEBUG_MODE)
net.net16.jeremiahlowe.fighters.Fighters.rng.setSeed(0);
else
net.net16.jeremiahlowe.fighters.Fighters.rng.setSee... |
private com.alchera.game.Structure.Managers.Scene getScene(com.alchera.game.Structure.Managers.SceneManager.SceneType type) {
switch (type) {
case SPLASH :
return new com.alchera.game.Structure.Managers.SplashScene(this);
case GAMEPLAY :
return new com.alchera.game.Structure.... | private com.alchera.game.Structure.Managers.Scene getScene(com.alchera.game.Structure.Managers.SceneManager.SceneType type) {
switch (type) {
case SPLASH :
return new com.alchera.game.Structure.Managers.SplashScene(this);
case MAINMENU :
return new com.alchera.game.Structure.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.