buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void parseResTableHeader() {
com.chris.pkg.manager.bean.android.resource.bean.chunk.header.ResTableHeader header = new com.chris.pkg.manager.bean.android.resource.bean.chunk.header.ResTableHeader();
header.setHeader(getResChunkHeader());
header.setPackageCount(this.reader.readInt());
this.table.... | private void parseResTableHeader() {
com.chris.pkg.manager.bean.android.resource.bean.chunk.header.ResTableHeader header = new com.chris.pkg.manager.bean.android.resource.bean.chunk.header.ResTableHeader();
header.setHeader(getResChunkHeader());
header.setPackageCount(reader.readInt());
table.setHeader(... |
protected static void openComponents(java.lang.String path) {
try {
main.Window.fis = new java.io.FileInputStream(path);
main.Window.ois = new java.io.ObjectInputStream(main.Window.fis);
main.Window.addedComponents = ((java.util.ArrayList<main.Window.AddedComponent>) (main.Window.ois.readObj... | private static void openComponents(java.lang.String path) {
try {
main.Window.fis = new java.io.FileInputStream(path);
main.Window.ois = new java.io.ObjectInputStream(main.Window.fis);
main.Window.addedComponents = ((java.util.ArrayList<main.Window.AddedComponent>) (main.Window.ois.readObjec... |
public void onListItemClick(int clickedItemIndex) {
if (!(com.sksanwar.bakingapp.Activities.MainActivity.isTablet)) {
android.content.Intent intent = new android.content.Intent(getActivity(), com.sksanwar.bakingapp.Activities.StepsDetailsActivity.class);
intent.putParcelableArrayListExtra(RecipeFrag... | public void onListItemClick(int clickedItemIndex) {
if (!(com.sksanwar.bakingapp.Activities.MainActivity.isTablet)) {
android.content.Intent intent = new android.content.Intent(getActivity(), com.sksanwar.bakingapp.Activities.StepsDetailsActivity.class);
intent.putParcelableArrayListExtra(RecipeFrag... |
public void addToGoroup(net.ukr.bior.Lesson2.HW.L1.Student student) throws net.ukr.bior.Lesson2.HW.L1.OutOfBoundGroupExeption {
int test = 0;
for (int i = 0; i < (gr.length); i++) {
if ((gr[i]) == null) {
gr[i] = student;
test = 1;
break;
}
}
if (test ... | public void addToGoroup(net.ukr.bior.Lesson2.HW.L1.Student student) throws net.ukr.bior.Lesson2.HW.L1.OutOfBoundGroupExeption {
if (student == null)
throw new java.lang.NullPointerException();
int test = 0;
for (int i = 0; i < (gr.length); i++) {
if ((gr[i]) == null) {
gr[i]... |
public void buildComponent(java.util.ArrayList<entity.DescriptionLabel> descriptionLabels, int view) {
_currentView = view;
_mainVbox.getChildren().clear();
double totalBuildedHeight = 0;
for (int i = 0; i < (descriptionLabels.size()); i++) {
_mainVbox.add(buildIndividualLabel(descriptionLabels.... | public void buildComponent(java.util.ArrayList<entity.DescriptionLabel> descriptionLabels, int view) {
_currentView = view;
_mainVbox.getChildren().clear();
double totalBuildedHeight = 0;
if (descriptionLabels != null) {
for (int i = 0; i < (descriptionLabels.size()); i++) {
_mainVbo... |
private android.view.View getViewForInfo(com.android.launcher3.ShortcutInfo item) {
for (int j = 0; j < (mContent.getCountY()); j++) {
for (int i = 0; i < (mContent.getCountX()); i++) {
android.view.View v = mContent.getChildAt(i, j);
if ((v.getTag()) == item) {
retur... | protected android.view.View getViewForInfo(com.android.launcher3.ShortcutInfo item) {
for (int j = 0; j < (mContent.getCountY()); j++) {
for (int i = 0; i < (mContent.getCountX()); i++) {
android.view.View v = mContent.getChildAt(i, j);
if ((v.getTag()) == item) {
ret... |
public void setCorrectAnswers(int sceneNum) {
switch (sceneNum) {
case 1 :
{
correctAnswersBtns[0] = btn4;
correctAnswersBtns[1] = btn7;
correctAnswersBtns[2] = btn12;
correctAnswersBtns[3] = btn15;
}
break;
... | public void setCorrectAnswers(int sceneNum) {
switch (sceneNum) {
case 1 :
{
correctAnswersBtns[0] = btn4;
correctAnswersBtns[1] = btn7;
correctAnswersBtns[2] = btn12;
correctAnswersBtns[3] = btn15;
}
break;
... |
public void testParentRefsForExtractedTopLevelItemAreEmpty() {
com.metabroadcast.atlas.glycerin.model.Episode tli = new com.metabroadcast.atlas.glycerin.model.Episode();
tli.setPid("p01mv8m3");
tli.setTitle("Pantocracy");
org.atlasapi.media.entity.Item extracted = extractor.extract(org.atlasapi.remotesi... | public void testParentRefsForExtractedTopLevelItemAreEmpty() {
com.metabroadcast.atlas.glycerin.model.Episode tli = new com.metabroadcast.atlas.glycerin.model.Episode();
tli.setPid("p01mv8m3");
tli.setTitle("Pantocracy");
org.atlasapi.media.entity.Item extracted = extractor.extract(org.atlasapi.remotesi... |
public boolean equals(java.lang.Object obj) {
if ((this) == obj)
return true;
if (!(super.equals(obj)))
return false;
if ((getClass()) != (obj.getClass()))
return false;
if (org.ow2.proactive.scheduler.task.internal.InternalTask.class.isAssignableFrom(obj.getClass(... | public boolean equals(java.lang.Object obj) {
if ((this) == obj)
return true;
if (!(super.equals(obj)))
return false;
if (org.ow2.proactive.scheduler.task.internal.InternalTask.class.isAssignableFrom(obj.getClass())) {
return ((org.ow2.proactive.scheduler.task.internal.Inte... |
public java.lang.String toString() {
java.lang.String print = "";
for (int i = 0; i < (N); i++) {
for (int j = 0; j < (N); j++) {
print += (board[i][j]) + " ";
}
print += "\n";
}
return print;
} | public java.lang.String toString() {
java.lang.String print = (N) + "\n";
for (int i = 0; i < (N); i++) {
for (int j = 0; j < (N); j++) {
print += (" " + (board[i][j])) + " ";
}
print += "\n";
}
return print;
} |
private void stop() {
org.eclipse.kura.linux.position.PositionServiceImpl.s_logger.debug("PositionService stopping");
if (((org.eclipse.kura.linux.position.PositionServiceImpl.monitorTask) != null) && (!(org.eclipse.kura.linux.position.PositionServiceImpl.monitorTask.isDone()))) {
org.eclipse.kura.linux... | private void stop() {
org.eclipse.kura.linux.position.PositionServiceImpl.s_logger.debug("PositionService stopping");
if (((org.eclipse.kura.linux.position.PositionServiceImpl.monitorTask) != null) && (!(org.eclipse.kura.linux.position.PositionServiceImpl.monitorTask.isDone()))) {
org.eclipse.kura.linux... |
public it.unibs.pajc.agar.universe.IntersectionType intersects(it.unibs.pajc.agar.universe.CircleObject otherObject) {
if ((getPosition().distance(otherObject.getPosition())) < (((getRadius()) + (otherObject.getRadius())) / 2)) {
if ((this.getMass()) > (otherObject.getMass()))
return Intersectio... | public it.unibs.pajc.agar.universe.IntersectionType intersects(it.unibs.pajc.agar.universe.CircleObject otherObject) {
if ((getPosition().distance(otherObject.getPosition())) < (getRadius())) {
if ((this.getMass()) > (otherObject.getMass()))
return IntersectionType.THIS_EATS;
else
... |
public void deleteLoanCreditChecks(final org.mifosplatform.portfolio.loanaccount.domain.Loan loan) {
java.util.Collection<org.mifosplatform.portfolio.loanaccount.domain.LoanCreditCheck> loanCreditCheckList = loan.getCreditChecks();
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(loanCreditCheckLis... | public void deleteLoanCreditChecks(final org.mifosplatform.portfolio.loanaccount.domain.Loan loan) {
java.util.Collection<org.mifosplatform.portfolio.loanaccount.domain.LoanCreditCheck> loanCreditCheckList = loan.getCreditChecks();
if ((loanCreditCheckList != null) && (!(loanCreditCheckList.isEmpty()))) {
... |
public void exitRangeFilter(com.aerospike.aql.grammar.AQLParser.RangeFilterContext ctx) {
long low = java.lang.Long.parseLong(ctx.low.getText());
long high = java.lang.Long.parseLong(ctx.high.getText());
java.lang.String binName = ctx.bin().getText();
com.aerospike.client.query.IndexCollectionType type ... | public void exitRangeFilter(com.aerospike.aql.grammar.AQLParser.RangeFilterContext ctx) {
long low = java.lang.Long.parseLong(ctx.low.getText());
long high = java.lang.Long.parseLong(ctx.high.getText());
java.lang.String binName = ctx.bin().getText();
com.aerospike.client.query.IndexCollectionType type ... |
private parser.Command markTask(java.lang.String input) {
try {
input = input.substring(((input.indexOf(" ")) + 1)).trim();
int i = java.lang.Integer.parseInt(input);
parser.CreateCmd markcmd = new parser.CreateCmd();
return markcmd.createMarkCommand(i);
} catch (java.lang.Except... | private parser.Command markTask(java.lang.String input) {
try {
if (!(input.contains(" "))) {
return null;
}
input = input.substring(((input.indexOf(" ")) + 1)).trim();
int i = java.lang.Integer.parseInt(input);
parser.CreateCmd markcmd = new parser.CreateCmd();
... |
protected void drawCircleFixture(javafx.scene.canvas.GraphicsContext gc, org.jbox2d.dynamics.Fixture fixture) {
org.jbox2d.collision.shapes.CircleShape circle = ((org.jbox2d.collision.shapes.CircleShape) (fixture.getShape()));
org.jbox2d.common.Vec2 fixturePos = new org.jbox2d.common.Vec2(body.getPosition().x, ... | protected void drawCircleFixture(javafx.scene.canvas.GraphicsContext gc, org.jbox2d.dynamics.Fixture fixture) {
org.jbox2d.collision.shapes.CircleShape circle = ((org.jbox2d.collision.shapes.CircleShape) (fixture.getShape()));
org.jbox2d.common.Vec2 fixturePos = new org.jbox2d.common.Vec2(((body.getPosition().x... |
public void terminate() {
this.terminated = true;
synchronized(this.mutex) {
this.mutex.notifyAll();
}
while (!(this.queue.isEmpty())) {
try {
java.lang.Thread.sleep(100);
} catch (java.lang.InterruptedException ex) {
}
}
} | public void terminate() {
while (!(this.queue.isEmpty())) {
try {
java.lang.Thread.sleep(100);
} catch (java.lang.InterruptedException ex) {
}
}
this.terminated = true;
synchronized(this.mutex) {
this.mutex.notifyAll();
}
} |
public static void main(java.lang.String[] args) {
if (args[0].toUpperCase().equals("RANDOM")) {
ShortestPathNew a = new ShortestPathNew();
}else {
try {
ShortestPathInput g = new ShortestPathInput(java.lang.Integer.parseInt(args[0]));
} catch (java.lang.IndexOutOfBoundsExcep... | public static void main(java.lang.String[] args) {
try {
ShortestPathInput g = new ShortestPathInput(java.lang.Integer.parseInt(args[0]));
} catch (java.lang.IndexOutOfBoundsException e) {
ShortestPathInput g = new ShortestPathInput(5);
}
ShortestPathInput.gooey.setVisible(true);
} |
public static void main(java.lang.String[] args) {
java.util.Scanner sc = new java.util.Scanner(java.lang.System.in);
int i = sc.nextInt();
int j = sc.nextInt();
PercolationStats pls = new PercolationStats(i, j);
java.lang.System.out.printf("mean = %f\n", pls.mean());
java.la... | public static void main(java.lang.String[] args) {
int i = java.lang.Integer.parseInt(args[0]);
int j = java.lang.Integer.parseInt(args[1]);
PercolationStats pls = new PercolationStats(i, j);
java.lang.System.out.printf("mean = %f\n", pls.mean());
java.lang.System.out.printf("std... |
protected void validateNamespace(java.lang.String namespace, java.lang.String filePath, org.antlr.v4.runtime.ParserRuleContext ctx) {
if (!(sources.containsKey(namespace))) {
sources.put(namespace, filePath);
}else {
notifyErrorListeners(((("Namespace Conflict: '" + namespace) + "' already defin... | protected void validateNamespace(java.lang.String namespace, java.lang.String filePath, org.antlr.v4.runtime.ParserRuleContext ctx) {
if (!(sources.containsKey(namespace))) {
sources.put(namespace, filePath);
}else
if (!(sources.get(namespace).equals(filePath))) {
notifyErrorListener... |
protected void calcRankAndCrowding(com.msu.moo.model.solution.SolutionSet population) {
rank = rankInd.calculate(population);
crowding = new java.util.HashMap<>();
for (com.msu.moo.model.solution.NonDominatedSolutionSet set : rankInd.getNonDominatedSets()) {
crowdInd.calculate(crowding, set.getSolut... | protected void calcRankAndCrowding(com.msu.moo.model.solution.SolutionSet population) {
rank = rankInd.calculate(population);
crowding = new java.util.HashMap<>();
for (com.msu.moo.model.solution.NonDominatedSolutionSet set : rankInd.getNonDominatedSets()) {
crowdInd.calculate(crowding, set.getSolut... |
protected static boolean appendIfNotEmpty(java.lang.StringBuilder builder, java.lang.String colName, java.math.BigInteger value, java.util.List<java.lang.Object> params, boolean needWhere) {
if ((value != null) && ((value.compareTo(java.math.BigInteger.ZERO)) > 0)) {
needWhere = io.jpress.model.query.JBaseQ... | protected static boolean appendIfNotEmpty(java.lang.StringBuilder builder, java.lang.String colName, java.math.BigInteger value, java.util.List<java.lang.Object> params, boolean needWhere) {
if (value != null) {
needWhere = io.jpress.model.query.JBaseQuery.appendWhereOrAnd(builder, needWhere);
build... |
public void resetDisplay() throws org.biojava.nbio.structure.align.model.StructureAlignmentException {
if ((multAln) != null) {
java.lang.String script = org.biojava.nbio.structure.align.gui.jmol.MultipleAlignmentJmol.getJmolString(multAln, atomArrays, colors);
java.lang.System.out.println(script);
... | public void resetDisplay() throws org.biojava.nbio.structure.align.model.StructureAlignmentException {
if ((multAln) != null) {
java.lang.String script = org.biojava.nbio.structure.align.gui.jmol.MultipleAlignmentJmol.getJmolString(multAln, atomArrays, colors);
evalString(script);
jmolPanel.... |
protected java.lang.Void doInBackground(java.lang.Void... params) {
java.lang.String url = cn.ieclipse.pay.wxpay.Wxpay.UNIFIED_ORDER_URL;
java.lang.String body = getRequest(this.params, false);
if (cn.ieclipse.pay.wxpay.Wxpay.DEBUG) {
cn.ieclipse.pay.wxpay.Wxpay.log(("\u4e0b\u5355\u8bf7\u6c42xml\u4e... | protected java.lang.Void doInBackground(java.lang.Void... params) {
java.lang.String url = cn.ieclipse.pay.wxpay.Wxpay.UNIFIED_ORDER_URL;
java.lang.String body = getRequest(this.params, false);
if (cn.ieclipse.pay.wxpay.Wxpay.DEBUG) {
cn.ieclipse.pay.wxpay.Wxpay.log(("\u4e0b\u5355\u8bf7\u6c42xml\u4e... |
protected void initializeConnectionProviders() throws org.n52.iceland.exception.ConfigurationException {
checkForProvidedJdbc();
dataConnectionProvider = org.n52.iceland.component.ConfiguringSingletonServiceLoader.<org.n52.iceland.ds.ConnectionProvider>loadAndConfigure(org.n52.iceland.ds.DataConnectionProvider.... | protected void initializeConnectionProviders() throws org.n52.iceland.exception.ConfigurationException {
checkForProvidedJdbc();
dataConnectionProvider.initialize(dataConnectionProviderProperties);
if ((featureConnectionProvider) != null) {
featureConnectionProvider.initialize(((featureConnectionPro... |
protected void writeEndpointDescription(int indentLevel, java.io.Writer writer, org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription endpointDescription) throws java.io.IOException {
indent(indentLevel, writer);
writer.append("<endpoint-description>");
newLine(writer);
writeProperties(in... | protected void writeEndpointDescription(int indentLevel, java.io.Writer writer, org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription endpointDescription) throws java.io.IOException {
if (endpointDescription != null) {
indent(indentLevel, writer);
writer.append("<endpoint-description>... |
public void downloadImage(android.view.View view) {
java.lang.String strUrl = etUrl.getText().toString().trim();
if (android.text.TextUtils.isEmpty(strUrl)) {
showErrorDialog("Empty Url");
}else {
startService(com.cnkaptan.idtmessagingtest.DownloadImageService.newInstance(this, SAMPLE_URL));... | public void downloadImage(android.view.View view) {
java.lang.String strUrl = etUrl.getText().toString().trim();
if (android.text.TextUtils.isEmpty(strUrl)) {
showErrorDialog("Empty Url");
}else {
startService(com.cnkaptan.idtmessagingtest.DownloadImageService.newInstance(this, strUrl));
... |
public void testAddUriAndCompareToString() throws java.io.IOException {
java.io.File ref = new java.io.File("/foobar");
java.io.File add_file = workspace.addFileByURI(new java.io.File((((workspace) + (java.io.File.separator)) + "foobar")).toURI());
org.hlib4j.io.Assert.assertEquals(ref.toURI(), add_file.toU... | public void testAddUriAndCompareToString() throws java.io.IOException {
java.io.File ref = new java.io.File(((java.io.File.separator) + "foobar"));
java.io.File add_file = workspace.addFileByURI(new java.io.File((((workspace) + (java.io.File.separator)) + "foobar")).toURI());
org.hlib4j.io.Assert.assertEqua... |
private boolean sampleDiffersFromReference(int position, char mostDominantBase) {
if ((position >= (NaiveVariantCaller.NaiveVariantCaller_Reducer.RCRS.length())) || ((NaiveVariantCaller.NaiveVariantCaller_Reducer.RCRS.charAt((position - 1))) == mostDominantBase)) {
return false;
}
return true;
} | private boolean sampleDiffersFromReference(int position, char mostDominantBase) {
int index = position - 1;
if (((index < 0) || (index >= (NaiveVariantCaller.NaiveVariantCaller_Reducer.RCRS.length()))) || ((NaiveVariantCaller.NaiveVariantCaller_Reducer.RCRS.charAt(index)) == mostDominantBase)) {
return ... |
public void pauseMedia() {
if ((playerTrack1.isPlaying()) == true) {
playerTrack1.pause();
}
if ((playerTrack2.isPlaying()) == true) {
playerTrack2.stop();
}
if ((playerTrack3.isPlaying()) == true) {
playerTrack3.stop();
}
if ((playerTrack4.isPlaying()) == true) {
... | public void pauseMedia() {
if (playerTrack1.isPlaying()) {
playerTrack1.pause();
}
if (playerTrack2.isPlaying()) {
playerTrack2.stop();
}
if (playerTrack3.isPlaying()) {
playerTrack3.stop();
}
if (playerTrack4.isPlaying()) {
playerTrack4.stop();
}
} |
public static boolean isLocalSnapshotSupported(com.emc.storageos.model.vpool.BlockVirtualPoolRestRep virtualPool) {
return (((virtualPool.getProtection()) != null) && ((virtualPool.getProtection().getSnapshots()) != null)) && ((virtualPool.getProtection().getSnapshots().getMaxSnapshots()) > 0);
} | public static boolean isLocalSnapshotSupported(com.emc.storageos.model.vpool.BlockVirtualPoolRestRep virtualPool) {
if (virtualPool == null) {
return false;
}
return (((virtualPool.getProtection()) != null) && ((virtualPool.getProtection().getSnapshots()) != null)) && ((virtualPool.getProtection().g... |
private void openFileDlg() {
int res;
res = saveConfirmation();
if (res != (javax.swing.JOptionPane.CANCEL_OPTION)) {
javax.swing.JFileChooser chooser = new javax.swing.JFileChooser();
javax.swing.filechooser.FileNameExtensionFilter filter = new javax.swing.filechooser.FileNameExtensionFilte... | private void openFileDlg() {
int res;
res = saveConfirmation();
if (res != (javax.swing.JOptionPane.CANCEL_OPTION)) {
javax.swing.JFileChooser chooser = new javax.swing.JFileChooser();
javax.swing.filechooser.FileNameExtensionFilter filter = new javax.swing.filechooser.FileNameExtensionFilte... |
private void showMovies(java.util.ArrayList<com.conuirwilliamson.popularmovies.models.Movie> movies) {
hideView(tvErrorMsg);
hideView(btnFavToMostPopular);
hideView(btnFavToTopRated);
hideView(pbLoadingMovies);
moviesAdapter.setData(movies);
if (((firstVisibleItemPosition) >= 0) && ((firstVisibl... | private void showMovies(java.util.ArrayList<com.conuirwilliamson.popularmovies.models.Movie> movies) {
hideView(tvErrorMsg);
hideView(btnFavToMostPopular);
hideView(btnFavToTopRated);
hideView(pbLoadingMovies);
moviesAdapter.setData(movies);
if (((firstVisibleItemPosition) >= 0) && ((firstVisibl... |
public static void transferScore(java.lang.String sessionVar) {
java.lang.String account;
boolean success;
int amount;
java.util.Scanner scanner = new java.util.Scanner(java.lang.System.in);
java.lang.System.out.println("Please Enter the name of the account that you want to transfer the coins to. ")... | public static void transferScore(java.lang.String sessionVar) {
java.lang.String account;
boolean success = true;
int amount;
java.util.Scanner scanner = new java.util.Scanner(java.lang.System.in);
java.lang.System.out.println("Please Enter the name of the account that you want to transfer the coins... |
public java.lang.String getState() {
VASSAL.tools.SequenceEncoder se = new VASSAL.tools.SequenceEncoder(',');
se.append(owner).append(label).append(("" + (nRed))).append(("" + (nBlack))).append(showing);
return se.getValue();
} | public java.lang.String getState() {
final VASSAL.tools.SequenceEncoder se = new VASSAL.tools.SequenceEncoder(',');
se.append(owner).append(label).append(nRed).append(nBlack).append(showing);
return se.getValue();
} |
public java.lang.String timestamp() {
java.lang.String timestamp = null;
java.util.Calendar cal = java.util.Calendar.getInstance();
java.text.DateFormat dfm = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
dfm.setTimeZone(java.util.TimeZone.getTimeZone("GMT"));
timestamp = dfm.format(ca... | private java.lang.String timestamp() {
java.lang.String timestamp = null;
java.util.Calendar cal = java.util.Calendar.getInstance();
java.text.DateFormat dfm = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
dfm.setTimeZone(java.util.TimeZone.getTimeZone("GMT"));
timestamp = dfm.format(c... |
private boolean isAfterCurrentDate(int inputDay, int inputMonth) {
c.setTimeInMillis(java.lang.System.currentTimeMillis());
boolean case1 = inputMonth > (c.get(java.util.Calendar.MONTH));
boolean case2 = (inputMonth == (c.get(java.util.Calendar.MONTH))) && (inputDay > (c.get(java.util.Calendar.DAY_OF_MONTH)... | private boolean isAfterCurrentDate(int inputDay, int inputMonth) {
c.setTimeInMillis(java.lang.System.currentTimeMillis());
boolean case1 = inputMonth > (c.get(java.util.Calendar.MONTH));
boolean case2 = (inputMonth == (c.get(java.util.Calendar.MONTH))) && (inputDay >= (c.get(java.util.Calendar.DAY_OF_MONTH... |
public void flatMap(org.wikipedia.citolytics.clickstream.types.ClickStreamResult clickStreamResult, org.apache.flink.util.Collector<org.apache.flink.api.java.tuple.Tuple2<java.lang.String, java.lang.Integer>> out) throws java.lang.Exception {
for (org.wikipedia.citolytics.clickstream.types.ClickStreamRecommendation... | public void flatMap(org.wikipedia.citolytics.clickstream.types.ClickStreamResult clickStreamResult, org.apache.flink.util.Collector<org.apache.flink.api.java.tuple.Tuple2<java.lang.String, java.lang.Long>> out) throws java.lang.Exception {
for (org.wikipedia.citolytics.clickstream.types.ClickStreamRecommendationRes... |
public com.sang.topic.common.model.ValidationResponse create(@com.sang.topic.controller.web.ModelAttribute
@javax.validation.Valid
com.sang.topic.common.entity.User user, org.springframework.validation.BindingResult bindingResult, javax.servlet.http.HttpSession httpSession) {
if (bindingResult.hasErrors()) {
... | public com.sang.topic.common.model.ValidationResponse create(@com.sang.topic.controller.web.ModelAttribute
@javax.validation.Valid
com.sang.topic.common.entity.User user, org.springframework.validation.BindingResult bindingResult, javax.servlet.http.HttpSession httpSession) {
if (bindingResult.hasErrors()) {
... |
public void createTag(org.searchisko.persistence.jpa.model.Tag tag) {
java.util.List<org.searchisko.persistence.jpa.model.Tag> tagList = getTagsByContent(tag.getContentId());
if (tagList.contains(tag)) {
return ;
}
tag.setCreatedAt(new java.sql.Timestamp(java.lang.System.currentTimeMillis()));
... | public boolean createTag(org.searchisko.persistence.jpa.model.Tag tag) {
java.util.List<org.searchisko.persistence.jpa.model.Tag> tagList = getTagsByContent(tag.getContentId());
if (tagList.contains(tag)) {
return false;
}
tag.setCreatedAt(new java.sql.Timestamp(java.lang.System.currentTimeMilli... |
public long setDoubleValue(long flags, double value) {
if (java.lang.Double.isNaN(value))
throw new java.lang.IllegalArgumentException("Value cannot be NaN");
long tmpValue = java.lang.Math.round((value / (factor)));
checkValue(java.lang.Math.round((tmpValue * (factor))));
tmpValue <<= shif... | public long setDoubleValue(long flags, double value) {
if (java.lang.Double.isNaN(value))
throw new java.lang.IllegalArgumentException("Value cannot be NaN");
long tmpValue = java.lang.Math.round((value / (factor)));
checkValue(((long) (tmpValue * (factor))));
tmpValue <<= shift;
flags ... |
protected void onCreate(android.os.Bundle savedInstanceState) {
if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.M)) {
if (writePermissionNotGranted()) {
requestWritePermission();
}
}
setContentView(R.layout.activity_main);
super.onCreate(savedInstanceState);
edu.txsta... | protected void onCreate(android.os.Bundle savedInstanceState) {
if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.M)) {
if (writePermissionNotGranted()) {
requestWritePermission();
}
}
setContentView(R.layout.activity_main);
super.onCreate(savedInstanceState);
edu.txsta... |
public com.rometools.rome.feed.WireFeed build(final java.io.File file) throws com.rometools.rome.io.FeedException, java.io.FileNotFoundException, java.io.IOException, java.lang.IllegalArgumentException {
com.rometools.rome.feed.WireFeed feed;
java.io.Reader reader = new java.io.FileReader(file);
if (xmlHeal... | public com.rometools.rome.feed.WireFeed build(final java.io.File file) throws com.rometools.rome.io.FeedException, java.io.FileNotFoundException, java.io.IOException, java.lang.IllegalArgumentException {
com.rometools.rome.feed.WireFeed feed;
java.io.Reader reader = new java.io.FileReader(file);
try {
... |
protected final void point(org.eclipse.swt.widgets.Event e) {
if (e.doit)
for (int i = (snapshot.length) - 1, I = 0; i >= I; i--) {
de.dualuse.swt.widgets.Layer r = snapshot[i];
if ((((r.captive()) == (captive)) && (r.isVisible())) && (r.isEnabled()))
r.point(e);
... | protected final void point(org.eclipse.swt.widgets.Event e) {
for (int i = (snapshot.length) - 1, I = 0; i >= I; i--) {
de.dualuse.swt.widgets.Layer r = snapshot[i];
if ((((e.doit) && ((r.captive()) == (captive))) && (r.isVisible())) && (r.isEnabled()))
r.point(e);
}
} |
private void sendMessageToChatBot(java.lang.String containerId, java.lang.String status) {
fr.aumjaud.antoine.services.common.http.HttpResponse httpResponse = httpHelper.postData(properties.getProperty("api-synology-chatbot.url"), properties.getProperty("api-synology-chatbot.secure-key", ((("Deploy " + status) + " ... | private void sendMessageToChatBot(java.lang.String containerId, java.lang.String status) {
fr.aumjaud.antoine.services.common.http.HttpResponse httpResponse = httpHelper.postData(properties.getProperty("api-synology-chatbot.url"), properties.getProperty("api-synology-chatbot.secure-key"), ((("Deploy " + status) + "... |
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.id.pools.id.pool.ChildPools> getChildPoolsInstanceIdentifier(java.lang.String poolName, java.lang.String localPoolName) {
org.opendaylight.yangtools.yang.binding.InstanceIden... | protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.id.pools.id.pool.ChildPools> getChildPoolsInstanceIdentifier(java.lang.String poolName, java.lang.String localPoolName) {
return org.opendaylight.yangtools.yang.binding.Insta... |
public static int[] grow(int[] x, int lengthToAdd) {
int[] result = new int[(x.length) + lengthToAdd];
for (int i = 1; i < (result.length); ++i) {
result[i] = x[(i - 1)];
}
return result;
} | public static int[] grow(int[] x, int lengthToAdd) {
int[] result = new int[(x.length) + lengthToAdd];
for (int i = lengthToAdd; i < (result.length); ++i) {
result[i] = x[(i - lengthToAdd)];
}
return result;
} |
public java.lang.String getDaynameOfWeek() {
int d = this.calendar.get(Calendar.DAY_OF_WEEK);
switch (d) {
case 1 :
return com.orientechnologies.orient.core.sql.method.intl.OCalendar.CAL_SUNDAY;
case 2 :
return com.orientechnologies.orient.core.sql.method.intl.OCalendar.C... | public java.lang.String getDaynameOfWeek() {
int d = this.calendar.get(Calendar.DAY_OF_WEEK);
switch (d) {
case 1 :
return com.orientechnologies.orient.core.sql.method.intl.OCalendar.CAL_SUNDAY;
case 2 :
return com.orientechnologies.orient.core.sql.method.intl.OCalendar.C... |
public void visitNode(com.sonar.sslr.api.AstNode node) {
if (((isHeader(getContext().getFile().getName())) && (node.getTokenValue().equals("using"))) && (node.getFirstChild().getChildren().toString().contains("namespace"))) {
getContext().createLineViolation(this, "Using namespace are not allowed in header ... | public void visitNode(com.sonar.sslr.api.AstNode node) {
if (((isHeader(getContext().getFile().getName())) && ("using".equals(node.getTokenValue()))) && (node.getFirstChild().getChildren().toString().contains("namespace"))) {
getContext().createLineViolation(this, "Using namespace are not allowed in header ... |
private de.uni_freiburg.informatik.ultimate.util.datastructures.Doubleton<de.uni_freiburg.informatik.ultimate.logic.Term> constructDefiningDoubleton(final de.uni_freiburg.informatik.ultimate.util.datastructures.Doubleton<de.uni_freiburg.informatik.ultimate.logic.Term> inVarDoubleton) {
final de.uni_freiburg.informa... | private de.uni_freiburg.informatik.ultimate.util.datastructures.Doubleton<de.uni_freiburg.informatik.ultimate.logic.Term> constructDefiningDoubleton(final de.uni_freiburg.informatik.ultimate.util.datastructures.Doubleton<de.uni_freiburg.informatik.ultimate.logic.Term> inVarDoubleton) {
final de.uni_freiburg.informa... |
public void blockScopedVariable() {
assertEquals(0, run(b.if_(b.true_(), b.sequence(b.declareVariable(int.class, "x"), b.setLocalVariable(0, "x", b.one()))), b.declareVariable(int.class, "x"), b.return_($x)));
} | public void blockScopedVariable() {
assertEquals(0, ((long) (run(b.if_(b.true_(), b.sequence(b.declareVariable(int.class, "x"), b.setLocalVariable(0, "x", b.one()))), b.declareVariable(int.class, "x"), b.return_($x)))));
} |
java.util.List<java.lang.String> links = crawler.getLinks();
java.lang.String link;
java.lang.String[] results;
for (int i = 0; i < (links.size()); i++) {
link = links.get(i);
results = crawler.processLink(link);
crawler.setTableRow(i, results);
crawlerPanel.setTableRow(i... | java.util.List<java.lang.String> links = crawler.getLinks();
java.lang.String link;
java.lang.String[] results;
for (int i = 0; i < (links.size()); i++) {
link = links.get(i);
results = crawler.processLink(link);
crawler.setTableRow(i, results);
}
} |
public org.joda.time.LocalDateTime read(java.lang.Object jsonValue, com.effektif.workflow.impl.json.JsonReader jsonReader) {
if (!(java.util.Date.class.isAssignableFrom(jsonValue.getClass()))) {
throw new com.effektif.workflow.impl.data.InvalidValueException(java.lang.String.format("Invalid date ‘%s’ (%s)",... | public org.joda.time.LocalDateTime read(java.lang.Object jsonValue, com.effektif.workflow.impl.json.JsonReader jsonReader) {
if (!(java.util.Date.class.isAssignableFrom(jsonValue.getClass()))) {
throw new com.effektif.workflow.impl.data.InvalidValueException(java.lang.String.format("Invalid date ‘%s’ (%s)",... |
public java.lang.Object eval(final java.lang.String script, final java.lang.String key) {
return new redis.clients.jedis.JedisClusterCommand<java.lang.Object>(connectionHandler, timeout, maxRedirections) {
@java.lang.Override
public java.lang.Object execute(redis.clients.jedis.Jedis connection) {
... | public java.lang.Object eval(final java.lang.String script, final java.lang.String key) {
return new redis.clients.jedis.JedisClusterCommand<java.lang.Object>(connectionHandler, timeout, maxRedirections) {
@java.lang.Override
public java.lang.Object execute(redis.clients.jedis.Jedis connection) {
... |
public void handleLogIn(java.lang.String username, java.lang.String password) {
app.model.User user;
try {
user = loginfacade.handleLogIn(username, password);
setUser(user);
if (user instanceof app.model.Customer) {
this.goTo("home");
}else {
this.goTo("no... | public void handleLogIn(java.lang.String username, java.lang.String password) {
app.model.User user;
try {
user = loginfacade.handleLogIn(username, password);
java.lang.System.out.print(user);
setUser(user);
if (user instanceof app.model.Customer) {
this.goTo("home");... |
public void mergeFileTable(java.lang.String ipAddress, int port, int clusterID, java.lang.String fileTableEntries, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
lk.filetributed.client.rpc.services.services.AsyncClient.mergeFileTable_call method_ca... | public void mergeFileTable(java.lang.String ipAddress, int port, java.lang.String fileTableEntries, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
lk.filetributed.client.rpc.services.services.AsyncClient.mergeFileTable_call method_call = new lk.fil... |
private void playLocalVideo(long position, boolean autoPlay) {
timber.log.Timber.d("VideoDetailsFragment : playLocalVideo()");
if ((location) == (com.etiennelawlor.loop.fragments.VideoDetailsFragment.PlaybackLocation.LOCAL)) {
thumbnailImageView.animate().alpha(0.0F).setDuration(1000);
castInfoT... | private void playLocalVideo(long position, boolean autoPlay) {
if ((location) == (com.etiennelawlor.loop.fragments.VideoDetailsFragment.PlaybackLocation.LOCAL)) {
thumbnailImageView.animate().alpha(0.0F).setDuration(1000);
castInfoTextView.setVisibility(View.GONE);
}
updateLocalVideoPosition... |
public void onEnable() {
this.saveDefaultConfig();
org.bukkit.Bukkit.getPluginManager().registerEvents(this, this);
mysql = new red.man10.man10mysqlapi.MySQLAPI(this, "Man10Score");
mysql.execute(createScoreLog);
api = new red.man10.man10score.Man10ScoreAPI();
loadSettingsToMemory();
pda = n... | public void onEnable() {
this.saveDefaultConfig();
org.bukkit.Bukkit.getPluginManager().registerEvents(this, this);
mysql = new red.man10.man10mysqlapi.MySQLAPI(this, "Man10Score");
mysql.execute(createScoreLog);
api = new red.man10.man10score.Man10ScoreAPI();
loadSettingsToMemory();
pda = n... |
public com.codebrig.beam.messages.BeamMessage messageReceived(com.codebrig.beam.SystemCommunicator comm, com.codebrig.beam.messages.BeamMessage message) {
if (comm.isTestingConnection()) {
comm.handleMessage(new com.codebrig.beam.messages.SystemMessage(com.codebrig.beam.messages.SystemMessageType.TEST_CONNE... | public com.codebrig.beam.messages.BeamMessage messageReceived(com.codebrig.beam.SystemCommunicator comm, com.codebrig.beam.messages.BeamMessage message) {
if (comm.isTestingConnection()) {
comm.handleMessage(new com.codebrig.beam.messages.SystemMessage(message).toBeamMessage());
return null;
}
... |
private void updateFragment() {
final com.example.alenor.weatherapplication.Weather newCityInfo = mDBHelper.getCityInformation(mSelectedTabName);
mWeatherFragment = new com.example.alenor.weatherapplication.WeatherFragment() {
@java.lang.Override
public com.example.alenor.weatherapplication.Weat... | private void updateFragment() {
if ((mSelectedTabName) != null) {
final com.example.alenor.weatherapplication.Weather newCityInfo = mDBHelper.getCityInformation(mSelectedTabName);
mWeatherFragment = new com.example.alenor.weatherapplication.WeatherFragment() {
@java.lang.Override
... |
public void testRefreshLockTimeout() throws java.lang.InterruptedException {
java.lang.String key = "sampleKey";
int maxLockCount = 1;
long timeoutSec = 2;
java.lang.String token1 = semaphore.attemptToAcquireLock(key, timeoutSec, maxLockCount);
org.junit.Assert.assertNotNull(token1);
for (int i ... | public void testRefreshLockTimeout() throws java.lang.InterruptedException {
int maxLockCount = 1;
long timeoutSec = 2;
java.lang.String token1 = semaphore.attemptToAcquireLock(key, timeoutSec, maxLockCount);
org.junit.Assert.assertNotNull(token1);
for (int i = 0; i < (timeoutSec + 1); i++) {
... |
public java.lang.String getDescription() {
if ((this.getFirstReferredColumn()) != null) {
if (!(org.dbflute.erflute.core.util.Check.isEmpty(this.foreignKeyDescription))) {
return this.foreignKeyDescription;
}else {
return this.getFirstReferredColumn().getDescription();
... | public java.lang.String getDescription() {
if ((getFirstReferredColumn()) != null) {
if (!(org.dbflute.erflute.core.util.Check.isEmpty(foreignKeyDescription))) {
return foreignKeyDescription;
}else {
return getFirstReferredColumn().getDescription();
}
}
return... |
public void deleteTagMap(java.util.ArrayList<java.lang.Integer> tagIDs) {
android.database.sqlite.SQLiteDatabase db = getWritableDatabase();
for (int id : tagIDs) {
db.delete(io.github.data4all.model.DataBaseHandler.TABLE_TAGMAP, ((io.github.data4all.model.DataBaseHandler.KEY_TAGID) + "=?"), new java.la... | public void deleteTagMap(java.util.ArrayList<java.lang.Integer> tagIDs) {
android.database.sqlite.SQLiteDatabase db = getWritableDatabase();
for (int id : tagIDs) {
db.delete(io.github.data4all.model.DataBaseHandler.TABLE_TAGMAP, ((io.github.data4all.model.DataBaseHandler.KEY_TAGID) + "=?"), new java.la... |
protected void validateLaunchConfigsCircularRefs(io.cattle.platform.core.model.Service service, java.lang.String serviceName, java.util.List<java.util.Map<java.lang.String, java.lang.Object>> launchConfigs) {
java.util.Map<java.lang.String, java.util.List<java.lang.String>> launchConfigRefs = populateLaunchConfigRe... | protected void validateLaunchConfigsCircularRefs(io.cattle.platform.core.model.Service service, java.lang.String serviceName, java.util.List<java.util.Map<java.lang.String, java.lang.Object>> launchConfigs) {
java.util.Map<java.lang.String, java.util.Set<java.lang.String>> launchConfigRefs = populateLaunchConfigRef... |
public static java.lang.String getXmlNodeValue(java.lang.String node, org.w3c.dom.Element element) {
org.w3c.dom.NodeList nList = element.getElementsByTagName(node).item(0).getChildNodes();
try {
org.w3c.dom.Node nValue = nList.item(0);
return nValue.getNodeValue();
} catch (java.lang.Except... | public static java.lang.String getXmlNodeValue(java.lang.String node, org.w3c.dom.Element element) {
try {
org.w3c.dom.NodeList nList = element.getElementsByTagName(node).item(0).getChildNodes();
org.w3c.dom.Node nValue = nList.item(0);
return nValue.getNodeValue();
} catch (java.lang.Ex... |
public java.math.BigDecimal getMA(int daysAgo, int days) throws java.io.IOException {
java.util.List<yahoofinance.histquotes.HistoricalQuote> quotes = getHistory(daysAgo, days);
java.math.BigDecimal ma = new java.math.BigDecimal(0);
for (yahoofinance.histquotes.HistoricalQuote quote : quotes) {
ma.a... | public java.math.BigDecimal getMA(int daysAgo, int days) throws java.io.IOException {
java.util.List<yahoofinance.histquotes.HistoricalQuote> quotes = getHistory(daysAgo, (days - 1));
java.math.BigDecimal ma = new java.math.BigDecimal(0);
for (yahoofinance.histquotes.HistoricalQuote quote : quotes) {
... |
public int getDishPageCount(int pageSize, java.lang.Long categoryId) throws com.innovaee.eorder.exception.CategoryNotFoundException, com.innovaee.eorder.exception.InvalidPageSizeException {
if (pageSize <= 0) {
throw new com.innovaee.eorder.exception.InvalidPageSizeException(pageSize);
}
com.innovae... | public int getDishPageCount(int pageSize, java.lang.Long categoryId) throws com.innovaee.eorder.exception.CategoryNotFoundException, com.innovaee.eorder.exception.InvalidPageSizeException {
if (pageSize <= 0) {
throw new com.innovaee.eorder.exception.InvalidPageSizeException(pageSize);
}
com.innovae... |
private void maybeResetHistogram() {
voldemort.store.stats.RequestCounter.Accumulator accum = values.get();
long now = time.getMilliseconds();
if ((now - (accum.startTimeMS)) <= (durationMS)) {
synchronized(histogram) {
q95LatencyMs = histogram.getQuantile(0.95);
q99LatencyMs... | private void maybeResetHistogram() {
voldemort.store.stats.RequestCounter.Accumulator accum = values.get();
long now = time.getMilliseconds();
if ((now - (accum.startTimeMS)) > (durationMS)) {
q95LatencyMs = histogram.getQuantile(0.95);
q99LatencyMs = histogram.getQuantile(0.99);
his... |
public static java.lang.String getFormatName(final java.lang.String id) {
if (!(com.github.lunatrius.schematica.world.schematic.SchematicFormat.FORMATS.containsKey(id))) {
Reference.logger.warn("No format for schematic with id {}; returning null", new com.github.lunatrius.schematica.world.schematic.Unsuppor... | public static java.lang.String getFormatName(final java.lang.String id) {
if (!(com.github.lunatrius.schematica.world.schematic.SchematicFormat.FORMATS.containsKey(id))) {
Reference.logger.warn("No format for schematic with id {}; returning null", id, new com.github.lunatrius.schematica.world.schematic.Unsu... |
public static boolean isRetrySite(java.lang.String uuid) {
com.emc.storageos.model.dr.SiteErrorResponse error = util.DisasterRecoveryUtils.getSiteError(uuid);
if (((!(error.getOperation().equals(SiteState.STANDBY_PAUSING.name()))) && (!(error.getOperation().equals(SiteState.STANDBY_RESUMING.name())))) && (!(err... | public static boolean isRetrySite(java.lang.String uuid) {
com.emc.storageos.model.dr.SiteErrorResponse error = util.DisasterRecoveryUtils.getSiteError(uuid);
if (((!(error.getOperation().equals(SiteState.STANDBY_PAUSING.name()))) && (!(error.getOperation().equals(SiteState.STANDBY_RESUMING.name())))) && (!(err... |
public static void checkMov51() {
if (((Data.LeftKneeAngl.MoCap[((Data.LeftKneeAngl.MoCap.length) - 1)]) < (dKneeStraight)) && ((Data.RightKneeAngl.MoCap[((Data.RightKneeAngl.MoCap.length) - 1)]) < (dKneeStraight))) {
bMovement51Completed = true;
}
} | public void checkMov51() {
if (((Data.LeftKneeAngl.MoCap[((Data.LeftKneeAngl.MoCap.length) - 1)]) < (dKneeStraight)) && ((Data.RightKneeAngl.MoCap[((Data.RightKneeAngl.MoCap.length) - 1)]) < (dKneeStraight))) {
bMovement51Completed = true;
}
} |
public void statusCheckerChecksUnpaidAndUnnotifiedOrdersAndFulfills() throws au.gov.qld.pub.orders.service.ServiceException {
org.mockito.Mockito.when(orderService.findUnpaidOrderIds(minAge)).thenReturn(new java.util.HashSet<java.lang.String>(java.util.Arrays.asList(au.gov.qld.pub.orders.service.ScheduleServiceTest... | public void statusCheckerChecksUnpaidAndUnnotifiedOrdersAndFulfills() throws au.gov.qld.pub.orders.service.ServiceException {
org.mockito.Mockito.when(orderService.findUnpaidOrderIds(minAge)).thenReturn(new java.util.HashSet<>(java.util.Arrays.asList(au.gov.qld.pub.orders.service.ScheduleServiceTest.UNPAID_ORDER_ID... |
public void run() {
if ((msg) >= (msgAmount))
msg = 0;
if (eCheck.hasTM)
new io.puharesource.mc.titlemanager.api.ActionbarTitleObject(((org.bukkit.ChatColor.GREEN) + (messages.get(msg)))).broadcast();
else
org.bukkit.Bukkit.dispatchCommand(org.bukkit.Bukkit.getConsoleSender(), (... | public void run() {
if ((msg) >= (msgAmount))
msg = 0;
if ((msgAmount) != 0) {
if (eCheck.hasTM)
new io.puharesource.mc.titlemanager.api.ActionbarTitleObject(((org.bukkit.ChatColor.GREEN) + (messages.get(msg)))).broadcast();
else
org.bukkit.Bukkit.dispatchCom... |
public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
models.Track track = ((models.Track) (o));
if ((epicodusId) != (track.epicodusId))
return false;
if (!(trackName.equals(... | public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
models.Track track = ((models.Track) (o));
if (!(trackName.equals(track.trackName)))
return false;
return trackDetails.e... |
public Location remove() {
Location oldval = sheep.get(1);
if ((size) > 1) {
sheep.set(1, sheep.remove(((size)--)));
doAPushUpButStayDownSoItsNotReallyAPushup(1);
}
return oldval;
} | public Location remove() {
Location oldval = sheep.get(1);
if ((size) > 1) {
sheep.set(1, sheep.remove(((size)--)));
doAPushUpButStayDownSoItsNotReallyAPushup(1);
}else {
sheep.remove(((size)--));
}
return oldval;
} |
public static Item getItem(int itemID) {
int i = 0;
int index = -1;
for (Item itemB : StockCache.instance.stock) {
if ((itemB.getID()) == itemID) {
index = i;
break;
}
i++;
}
if (StockCache.verbose)
java.lang.System.out.println(("index is: " + ... | public static Item getItem(int itemID) {
int i = 0;
int index = -1;
for (Item itemB : StockCache.instance.stock) {
if ((itemB.getID()) == itemID) {
index = i;
break;
}
i++;
}
if (index < 0) {
return null;
}
return StockCache.instance.st... |
public void initTest() throws java.io.IOException {
maxim.z.BytesReaderWriter brw = new maxim.z.MemoryReaderWriter(0);
maxim.z.FileSystem fs = maxim.z.FileSystem.getFileSystem(brw);
fs.init();
byte[] actual = new byte[((FSConstants.Offsets.FAT_TABLE) + ((FSConstants.DEFAULT_CLUSTER_COUNT) * (FSConstants... | public void initTest() throws java.io.IOException {
maxim.z.BytesReaderWriter brw = new maxim.z.MemoryReaderWriter(0);
maxim.z.FileSystem fs = maxim.z.FileSystem.getFileSystem(brw, FSConstants.DEFAULT_CLUSTER_COUNT, FSConstants.DEFAULT_CLUSTER_SIZE);
fs.init();
byte[] actual = new byte[((FSConstants.Off... |
public com.hust.mining.model.ResultWithBLOBs getResultWithBLOBsById(java.lang.String resultId, java.lang.String issueId) {
com.hust.mining.model.ResultExample example = new com.hust.mining.model.ResultExample();
com.hust.mining.model.ResultExample.Criteria cri = example.createCriteria();
cri.andRidEqualTo(r... | public com.hust.mining.model.ResultWithBLOBs getResultWithBLOBsById(java.lang.String resultId, java.lang.String issueId) {
com.hust.mining.model.ResultExample example = new com.hust.mining.model.ResultExample();
com.hust.mining.model.ResultExample.Criteria cri = example.createCriteria();
cri.andRidEqualTo(r... |
private void setWidgetStateAppropriately() {
selected = mainConfigDialog.getCurrentConnection();
if ((selected) == null) {
dismiss();
}
commandIndex = selected.getAutoXType();
origCommandIndex = selected.getAutoXType();
spinnerAutoXType.setSelection(commandIndex);
setRemoteWidthAndHe... | private void setWidgetStateAppropriately() {
selected = mainConfigDialog.getCurrentConnection();
if ((selected) == null) {
dismiss();
return ;
}
commandIndex = selected.getAutoXType();
origCommandIndex = selected.getAutoXType();
spinnerAutoXType.setSelection(commandIndex);
se... |
private void writeActiveModsToFile(@org.jetbrains.annotations.NotNull
com.sdoras.mods.manager.core.ModManager modManager) {
try (java.io.BufferedWriter output = new java.io.BufferedWriter(new java.io.FileWriter(mTrackingFile, false))) {
for (com.sdoras.mods.manager.core.Mod mod : modManager.getManagedMods()... | private void writeActiveModsToFile(@org.jetbrains.annotations.NotNull
com.sdoras.mods.manager.core.ModManager modManager) {
try (java.io.BufferedWriter output = new java.io.BufferedWriter(new java.io.FileWriter(mTrackingFile, false))) {
for (com.sdoras.mods.manager.core.Mod mod : modManager.getManagedMods()... |
public void dropCollection(final java.lang.String collectionName) throws io.lumeer.engine.api.exception.CollectionNotFoundException {
if (dataStorage.hasCollection(collectionName)) {
linkingFacade.dropCollectionLinks(collectionName);
dataStorage.dropCollection(collectionName);
dropCollection... | public void dropCollection(final java.lang.String collectionName) throws io.lumeer.engine.api.exception.CollectionNotFoundException {
if (dataStorage.hasCollection(collectionName)) {
linkingFacade.dropCollectionLinks(collectionName);
dropCollectionMetadata(collectionName);
dataStorage.dropCo... |
public void runOnce() {
super.runOnce();
java.util.List<T> agents = environment.getAllAgents();
boolean canStop = true;
int i = 0;
int size = agents.size();
T agent;
while ((i < size) && canStop) {
agent = agents.get(i);
if (!(agent.canStopSimulation())) {
canStop... | public void runOnce() {
super.runOnce();
java.util.List<T> agents = environment.getAllAgents();
boolean canStop = true;
int i = 0;
int size = agents.size();
T agent;
while ((i < size) && canStop) {
agent = agents.get(i);
if (!(agent.canStopSimulation())) {
canStop... |
public com.upplication.s3fs.S3FileSystem getFileSystem(java.net.URI uri) {
validateUri(uri);
java.lang.String key = this.getFileSystemKey(uri);
if (com.upplication.s3fs.S3FileSystemProvider.fileSystems.containsKey(key)) {
return com.upplication.s3fs.S3FileSystemProvider.fileSystems.get(key);
}el... | public com.upplication.s3fs.S3FileSystem getFileSystem(java.net.URI uri) {
validateUri(uri);
java.lang.String key = this.getFileSystemKey(uri);
if (com.upplication.s3fs.S3FileSystemProvider.fileSystems.containsKey(key)) {
return com.upplication.s3fs.S3FileSystemProvider.fileSystems.get(key);
}el... |
public void render(float delta) {
Gdx.gl.glClearColor(0.5F, 0.5F, 0.5F, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
log.appendText(((text) + "\n"));
text = "";
stage.act();
stage.draw();
} | public void render(float delta) {
Gdx.gl.glClearColor(0.5F, 0.5F, 0.5F, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
if (!(text.equals("")))
log.appendText(((text) + "\n"));
text = "";
stage.act();
stage.draw();
} |
public void onArrowHitPlayer(org.bukkit.event.entity.EntityDamageEvent event) {
if (((event.getEntity()) instanceof org.bukkit.entity.Player) && (event.getCause().equals(DamageCause.PROJECTILE))) {
org.bukkit.Bukkit.broadcastMessage("HIT");
org.bukkit.entity.Player victim = ((org.bukkit.entity.Playe... | public void onArrowHitPlayer(org.bukkit.event.entity.EntityDamageEvent event) {
if ((event.getEntity()) instanceof org.bukkit.entity.Player) {
org.bukkit.Bukkit.broadcastMessage("HIT");
org.bukkit.entity.Player victim = ((org.bukkit.entity.Player) (event.getEntity()));
if (org.kwstudios.play... |
public java.lang.Void call() throws java.lang.Exception {
try {
((org.jtrfp.trcl.game.TVF3Game) (tr.getGame())).abortCurrentMission();
((org.jtrfp.trcl.game.TVF3Game) (tr.getGame())).setLevelIndex(levelList.getSelectedIndex());
((org.jtrfp.trcl.game.TVF3Game) (tr.getGame())).doGameplay();
... | public java.lang.Void call() throws java.lang.Exception {
try {
((org.jtrfp.trcl.game.TVF3Game) (tr.getGame())).abortCurrentMission();
((org.jtrfp.trcl.game.TVF3Game) (tr.getGame())).setLevelIndex(levelList.getSelectedIndex());
((org.jtrfp.trcl.game.TVF3Game) (tr.getGame())).doGameplay();
... |
public void setLastStep(int u, int v) {
int color = graph[u][v];
steps.push(new int[]{ u , v , color });
if (((colors.length) - 1) == color) {
colors = java.util.Arrays.copyOf(colors, ((colors.length) * 2));
}
(colors[(color - 1)])++;
this.setChanged();
this.notifyObservers();
} | public void setLastStep(int u, int v) {
int color = graph[u][v];
steps.push(new int[]{ u , v });
if (((colors.length) - 1) == color) {
colors = java.util.Arrays.copyOf(colors, ((colors.length) * 2));
}
(colors[(color - 1)])++;
this.setChanged();
this.notifyObservers();
} |
private boolean contains(int col, @javax.annotation.Nullable
java.lang.Object o) {
for (int i = 0; i <= (elements); i++) {
java.lang.Object c = get(col, i);
if (((o == null) && (c == null)) || ((o != null) && (o.equals(c)))) {
return true;
}
}
return false;
} | private boolean contains(int col, @javax.annotation.Nullable
java.lang.Object o) {
for (int i = 0; i < (elements); i++) {
java.lang.Object c = get(col, i);
if (((o == null) && (c == null)) || ((o != null) && (o.equals(c)))) {
return true;
}
}
return false;
} |
private void saveListToFile(java.util.List<java.util.List<java.lang.Number>> newList, java.lang.String name) {
java.lang.String filePath = ((path) + (java.io.File.separator)) + name;
try (java.io.BufferedWriter bw = new java.io.BufferedWriter(new java.io.FileWriter(new java.io.File(filePath)))) {
writeL... | private void saveListToFile(java.util.List<java.util.List<java.lang.Number>> newList, java.lang.String name) {
try (java.io.BufferedWriter bw = new java.io.BufferedWriter(new java.io.FileWriter(new java.io.File(name)))) {
writeList(newList, bw);
} catch (java.io.IOException e) {
com.alphatica.ge... |
public void testGetBounds() {
org.junit.Assume.assumeFalse(java.awt.GraphicsEnvironment.isHeadless());
testNew();
org.junit.Assert.assertEquals("lts.getBounds() is equal to...", new java.awt.geom.Rectangle2D.Double(30.20101012677667, 85.85786437626905, 39.59797974644667, 28.284271247461902), lts.getBounds()... | public void testGetBounds() {
testNew();
org.junit.Assert.assertEquals("lts.getBounds() is equal to...", new java.awt.geom.Rectangle2D.Double(30.20101012677667, 85.85786437626905, 39.59797974644667, 28.284271247461902), lts.getBounds());
java.awt.geom.Rectangle2D b = ltd.getBounds();
org.junit.Assert.as... |
public void testSuccessOnNewEntityLocks(int totalEntityLocks, int danglingEntityLocks, int hostCount) throws java.lang.Throwable {
machine = com.vmware.photon.controller.cloudstore.xenon.helpers.TestEnvironment.create(hostCount);
seedTestEnvironment(machine, totalEntityLocks, danglingEntityLocks);
request.e... | public void testSuccessOnNewEntityLocks(int totalEntityLocks, int danglingEntityLocks, int hostCount) throws java.lang.Throwable {
machine = com.vmware.photon.controller.cloudstore.xenon.helpers.TestEnvironment.create(hostCount);
seedTestEnvironment(machine, totalEntityLocks, danglingEntityLocks, false);
re... |
public void processText(java.lang.String text) {
java.lang.String[] array = text.replaceAll("\\pP", " ").toLowerCase().split("\\s+");
for (int i = 0; i < (array.length); i++) {
java.lang.String term = array[i];
incrementTermCount(term);
(totalTerms)++;
}
} | public void processText(java.lang.String text) {
java.lang.String[] array = text.replaceAll("\\pP", " ").toLowerCase().split("\\s+");
for (int i = 0; i < (array.length); i++) {
java.lang.String term = array[i];
incrementTermCount(term);
}
totalTerms = size();
} |
public static java.lang.String marshal(final java.util.Date value) {
if (value == null) {
return null;
}
java.util.Calendar cal = new java.util.GregorianCalendar();
cal.setTime(value);
java.text.SimpleDateFormat sf = com.admazing.core.models.DateAdapter.dateFormatter.get();
java.lang.Str... | public static java.lang.String marshal(final java.util.Date value) {
if (value == null) {
return null;
}
java.util.Calendar cal = new java.util.GregorianCalendar();
cal.setTime(value);
java.text.SimpleDateFormat sf = com.admazing.core.models.DateAdapter.dateFormatter.get();
java.lang.Str... |
public user.User login() throws user.loginException {
if (user.User.userExist(username)) {
user.User u = user.User.getUserByUsername(username);
try {
password = user.PasswordHash.hash(password);
} catch (java.security.NoSuchAlgorithmException e) {
}
if (java.util.... | public user.User login() throws user.loginException {
if (user.User.userExist(username)) {
user.User u = user.User.getUserByUsername(username);
try {
password = user.PasswordHash.hash(password);
} catch (java.security.NoSuchAlgorithmException e) {
return null;
... |
private xpra.network.chunks.StreamChunk readCompressed(java.io.InputStream is) throws java.io.IOException {
while ((is.available()) > 0) {
final int r = is.read(buffer, 0, buffer.length);
if (r < 0) {
return null;
}
output.write(buffer, 0, r);
}
patches.put(packe... | private xpra.network.chunks.StreamChunk readCompressed(java.io.InputStream is) throws java.io.IOException {
while ((is.available()) > 0) {
final int r = is.read(buffer, 0, buffer.length);
if (r < 0) {
break;
}
output.write(buffer, 0, r);
}
patches.put(packetIndex... |
public void wraps(int bonus) {
this.hasRole = false;
this.roleRank = 0;
this.roleBudget = 0;
this.playerLocation = null;
this.playerRole = null;
this.onOffCard = "none";
this.playerReheasalCredits = 0;
this.playerDollars += bonus;
} | public void wraps(int bonus) {
this.hasRole = false;
this.roleRank = 1;
this.roleBudget = 0;
this.playerRole = null;
this.onOffCard = "none";
this.playerReheasalCredits = 0;
this.playerDollars += bonus;
} |
private void initControllers(main.java.flash.Main main) {
allTableControl = new main.java.gui.TasksTableController();
floatingTableControl = new main.java.gui.TasksTableController();
overdueTableControl = new main.java.gui.TasksTableController();
pendingTableControl = new main.java.gui.TasksTableControl... | private void initControllers(main.java.flash.Main main) {
allTableControl = new main.java.gui.TasksTableController();
floatingTableControl = new main.java.gui.TasksTableController();
overdueTableControl = new main.java.gui.TasksTableController();
pendingTableControl = new main.java.gui.TasksTableControl... |
public void clickedConnection(android.view.View view) {
android.widget.CheckBox checkBox = ((android.widget.CheckBox) (findViewById(R.id.connectionCheck)));
checkBox.toggle();
if (checkBox.isChecked()) {
android.widget.Toast.makeText(context, "You are connected to the database", Toast.LENGTH_SHORT).... | public void clickedConnection(android.view.View view) {
android.widget.CheckBox checkBox = ((android.widget.CheckBox) (findViewById(R.id.connectionCheck)));
checkBox.toggle();
if (checkBox.isChecked()) {
android.widget.Toast.makeText(context, "You are connected to the database", Toast.LENGTH_SHORT).... |
private void updateComponentSchema() {
org.talend.core.runtime.services.IGenericWizardService wizardService = null;
if (org.talend.core.GlobalServiceRegister.getDefault().isServiceRegistered(org.talend.core.runtime.services.IGenericWizardService.class)) {
wizardService = ((org.talend.core.runtime.servic... | private void updateComponentSchema() {
org.talend.core.runtime.services.IGenericWizardService wizardService = null;
if (org.talend.core.GlobalServiceRegister.getDefault().isServiceRegistered(org.talend.core.runtime.services.IGenericWizardService.class)) {
wizardService = ((org.talend.core.runtime.servic... |
public boolean onBlockActivated(net.minecraft.world.World worldIn, int x, int y, int z, net.minecraft.entity.player.EntityPlayer player, int side, float subX, float subY, float subZ) {
if (!(worldIn.isRemote)) {
}
player.openGui(ModUncrafting.instance, ModGuiHandler.GUI_TABLE, worldIn, x, y, z);
checkFo... | public boolean onBlockActivated(net.minecraft.world.World worldIn, int x, int y, int z, net.minecraft.entity.player.EntityPlayer player, int side, float subX, float subY, float subZ) {
if (!(worldIn.isRemote)) {
player.openGui(ModUncrafting.instance, ModGuiHandler.GUI_TABLE, worldIn, x, y, z);
check... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.