buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void validate(final boolean async) { createRulesSafelyAndLazily(); android.view.View lastView = getLastView(); if (com.mobsandgeeks.saripaar.Validator.Mode.BURST.equals(mValidationMode)) { validateUnorderedFieldsWithCallbackTill(lastView, async); }else if (com.mobsandgeeks.saripaa...
public void validate(final boolean async) { createRulesSafelyAndLazily(false); android.view.View lastView = getLastView(); if (com.mobsandgeeks.saripaar.Validator.Mode.BURST.equals(mValidationMode)) { validateUnorderedFieldsWithCallbackTill(lastView, async); }else if (com.mobsandgeeks.sa...
public com.lousylynx.slik.common.Response handle(com.lousylynx.slik.common.Request request, com.lousylynx.slik.common.Response response) { response.setType(ContentType.HTML); response.append((("This is a test. Click <a href=\"" + (com.lousylynx.slik.Slik.pathFor("home"))) + "\">here</a>.<br /> You inputted: <br...
public com.lousylynx.slik.common.Response handle(com.lousylynx.slik.common.Request request, com.lousylynx.slik.common.Response response) { response.setType(ContentType.HTML); response.append((("This is a test. Click <a href=\"" + (com.lousylynx.slik.Slik.pathFor("home"))) + "\">here</a>.<br /> You inputted: <br...
public void onDoubleClick(org.primefaces.event.SelectEvent selectEvent) throws java.io.IOException { de.yaskor.whisk.entity.Item item = ((de.yaskor.whisk.entity.Item) (selectEvent.getObject())); org.primefaces.context.RequestContext context = org.primefaces.context.RequestContext.getCurrentInstance(); if (i...
public void onDoubleClick(org.primefaces.event.SelectEvent selectEvent) throws java.io.IOException { if ((selectEvent.getObject()) == null) { return ; } de.yaskor.whisk.entity.Item item = ((de.yaskor.whisk.entity.Item) (selectEvent.getObject())); org.primefaces.context.RequestContext context = o...
private int getFreeBlock() { if ((numFreeBlocks) == 0) { throw new decaf.tacvm.exec.ExecuteException("Insufficent Memory"); } int id = freeBlocks[(--(numFreeBlocks))]; java.util.Arrays.fill(memory, (id << 10), ((id << 10) + 1024), 0); return freeBlocks[(--(numFreeBlocks))]; }
private int getFreeBlock() { if ((numFreeBlocks) == 0) { throw new decaf.tacvm.exec.ExecuteException("Insufficent Memory"); } int id = freeBlocks[(--(numFreeBlocks))]; java.util.Arrays.fill(memory, (id << 10), ((id << 10) + 1024), 0); return id; }
private void createSymlinkInt(java.lang.String target, java.lang.String link, org.apache.hadoop.fs.permission.PermissionStatus dirPerms, boolean createParent) throws io.hops.exception.StorageException, java.io.IOException, org.apache.hadoop.hdfs.server.namenode.UnresolvedLinkException { org.apache.hadoop.hdfs.proto...
private void createSymlinkInt(java.lang.String target, java.lang.String link, org.apache.hadoop.fs.permission.PermissionStatus dirPerms, boolean createParent) throws java.io.IOException { org.apache.hadoop.hdfs.protocol.HdfsFileStatus resultingStat; org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker pc ...
private void gotGlobalReqResponse(net.schmizz.sshj.common.SSHPacket response) throws net.schmizz.sshj.connection.ConnectionException { synchronized(globalReqPromises) { net.schmizz.concurrent.Promise<net.schmizz.sshj.common.SSHPacket, net.schmizz.sshj.connection.ConnectionException> gr = globalReqPromises.p...
private void gotGlobalReqResponse(net.schmizz.sshj.common.SSHPacket response) throws net.schmizz.sshj.connection.ConnectionException { synchronized(globalReqPromises) { net.schmizz.concurrent.Promise<net.schmizz.sshj.common.SSHPacket, net.schmizz.sshj.connection.ConnectionException> gr = globalReqPromises.p...
private int handleOrientation() { final int o = this.getResources().getConfiguration().orientation; switch (o) { case android.content.res.Configuration.ORIENTATION_LANDSCAPE : if (!(trend_view_running)) { android.util.Log.i(com.mooshim.mooshimeter.main.DeviceActivity.TAG, "St...
private void handleOrientation() { switch (this.getResources().getConfiguration().orientation) { case android.content.res.Configuration.ORIENTATION_LANDSCAPE : if (!(trend_view_running)) { android.util.Log.i(com.mooshim.mooshimeter.main.DeviceActivity.TAG, "Starting trend view.")...
public com.example.ryan.testapplications.section findSection(int cID) { int i; com.example.ryan.testapplications.section s; if ((sections.size()) != 0) { for (i = 0; i < (sections.size()); i++) { s = ((com.example.ryan.testapplications.section) (sections.get(i))); if (cID == ...
public com.example.ryan.testapplications.section findSection(int cID) { int i; com.example.ryan.testapplications.section s; if ((sections.size()) != 0) { for (i = 0; i < (sections.size()); i++) { s = ((com.example.ryan.testapplications.section) (sections.get(i))); if (cID == ...
private void updateTelemetryData() { telemetry.addData(TAG, "Status : RUNNING"); telemetry.addData(TAG, ("Left Ultrasonic Detected : " + (robotUtilities.getUltrasonicLevel(robot.ultrasonicSensorLeft)))); telemetry.addData(TAG, ("Right Ultrasonic Detected : " + (robotUtilities.getUltrasonicLevel(robot.ultras...
private void updateTelemetryData() { telemetry.addData(TAG, "Status : RUNNING"); telemetry.addData(TAG, ("Left Ultrasonic Detected : " + (robot.ultrasonicSensorLeft.getUltrasonicLevel()))); telemetry.addData(TAG, ("Right Ultrasonic Detected : " + (robot.ultrasonicSensorRight.getUltrasonicLevel()))); tel...
private void setUpRecyclerView() { android.support.v7.widget.RecyclerView.LayoutManager layoutManager = new android.support.v7.widget.LinearLayoutManager(getContext()); recyclerView.setLayoutManager(layoutManager); recyclerViewAdapter = new com.example.magda.systeminformacyjny.utils.RecyclerViewEventsAdapte...
private void setUpRecyclerView() { android.support.v7.widget.RecyclerView.LayoutManager layoutManager = new android.support.v7.widget.LinearLayoutManager(getContext()); recyclerView.setLayoutManager(layoutManager); recyclerViewAdapter = new com.example.magda.systeminformacyjny.utils.RecyclerViewEventsAdapte...
public void render(float delta) { Gdx.gl.glClear(((com.badlogic.gdx.graphics.GL20.GL_COLOR_BUFFER_BIT) | (com.badlogic.gdx.graphics.GL20.GL_DEPTH_BUFFER_BIT))); Gdx.gl.glEnable(GL20.GL_DEPTH_TEST); float deltaTime = Gdx.graphics.getDeltaTime(); batch.setProjectionMatrix(camera.combined); batch.begin...
public void render(float delta) { Gdx.gl.glClear(((com.badlogic.gdx.graphics.GL20.GL_COLOR_BUFFER_BIT) | (com.badlogic.gdx.graphics.GL20.GL_DEPTH_BUFFER_BIT))); Gdx.gl.glEnable(GL20.GL_DEPTH_TEST); float deltaTime = Gdx.graphics.getDeltaTime(); batch.setProjectionMatrix(camera.combined); batch.begin...
public com.lhc.highlight.HighLight addHighLight(android.view.View view, int decorLayoutId, com.lhc.highlight.position.IPositionStrategy posStrategy, com.lhc.highlight.shape.IHighLight highLightShape) { checkAnchor(); if (view == null) { return this; } android.view.View parent = mAnchor; com....
public com.lhc.highlight.HighLight addHighLight(android.view.View view, int decorLayoutId, com.lhc.highlight.position.IPositionStrategy posStrategy, com.lhc.highlight.shape.IHighLight highLightShape) { checkAnchor(); if (view != null) { android.view.View parent = mAnchor; com.lhc.highlight.HighL...
public android.support.v4.app.Fragment getItem(int position) { android.support.v4.app.Fragment retFragment = com.example.harsh.iiitdquora.FeedFragment.newInstance(); switch (position) { case 0 : retFragment = com.example.harsh.iiitdquora.FeedFragment.newInstance(); setFocusOfButt...
public android.support.v4.app.Fragment getItem(int position) { android.support.v4.app.Fragment retFragment = com.example.harsh.iiitdquora.FeedFragment.newInstance(); switch (position) { case 0 : retFragment = com.example.harsh.iiitdquora.FeedFragment.newInstance(); break; ...
public org.springframework.http.ResponseEntity<org.openlmis.core.web.OpenLmisResponse> getDistributedFacilities(@org.springframework.web.bind.annotation.RequestParam(value = "periodId") java.lang.Long periodId, @org.springframework.web.bind.annotation.RequestParam(value = "facilityId") java.lang.Long facilityId, @org.s...
public org.springframework.http.ResponseEntity<org.openlmis.core.web.OpenLmisResponse> getDistributedFacilities(@org.springframework.web.bind.annotation.RequestParam(value = "periodId") java.lang.Long periodId, @org.springframework.web.bind.annotation.RequestParam(value = "facilityId") java.lang.Long facilityId, @org.s...
public static int convertTime(int time, int duration) { int temp = 0; java.lang.System.out.println(("Time is" + (time % 100))); if (((time % 100) + duration) > 60) { temp = duration - 60; time += 100 + temp; }else if (((time % 100) + duration) == 60) time = ((time + 1...
public static int convertTime(int time, int duration) { int temp = 0; if (((time % 100) + duration) > 60) { temp = duration - 60; time += 100 + temp; }else if (((time % 100) + duration) == 60) time = ((time + 100) / 100) * 100; else time += duration; ...
private int manhattanDistance(int i, int j) { int g = (goal(i, j)) - 1; int gr = g / (N); int gc = g % (N); int b = (tiles[i][j]) - 1; int br = b / (N); int bc = b % (N); return (java.lang.Math.abs((br - gr))) + (java.lang.Math.abs((bc - gc))); }
private int manhattanDistance(int i, int j) { int b = (tiles[i][j]) - 1; int br = b / (N); int bc = b % (N); return (java.lang.Math.abs((br - i))) + (java.lang.Math.abs((bc - j))); }
public void beginLeavesDecay(net.minecraft.world.World world, int x, int y, int z) { forestry.arboriculture.gadgets.TileLeaves tile = forestry.arboriculture.gadgets.ForestryBlockLeaves.getLeafTile(world, x, y, z); if ((tile != null) && (tile.isDecorative())) return ; world.setBlockMetadataWithN...
public void beginLeavesDecay(net.minecraft.world.World world, int x, int y, int z) { forestry.arboriculture.gadgets.TileLeaves tile = forestry.arboriculture.gadgets.ForestryBlockLeaves.getLeafTile(world, x, y, z); if ((tile == null) || (tile.isDecorative())) return ; super.beginLeavesDecay(worl...
private static int minIndex(double[] array) { int index = -1; double min = java.lang.Double.POSITIVE_INFINITY; for (int i = 0; i < (array.length); i++) { if ((array[i]) < min) { min = array[i]; index = i; } } return index; }
private static int minIndex(double[] array) { int index = -1; double min = java.lang.Double.POSITIVE_INFINITY; for (int i = 0; i < (array.length); i++) { if ((array[i]) <= min) { min = array[i]; index = i; } } return index; }
private void mergeComponentsResources(java.io.File components) throws java.io.IOException { getLog().debug("Starting Components Merge Process"); org.jaffa.plugins.util.FileFinder componentDefinitionsResourceFinder = new org.jaffa.plugins.util.FileFinder((((COMPONENT_DEFINITIONS) + "*.") + (XFRAGMENT))); jav...
private void mergeComponentsResources(java.io.File components) throws java.io.IOException { getLog().debug("Starting Components Merge Process"); org.jaffa.plugins.util.FileFinder componentDefinitionsResourceFinder = new org.jaffa.plugins.util.FileFinder((((COMPONENT_DEFINITIONS) + "*.") + (XFRAGMENT))); jav...
private static void alterDelegate(java.lang.Object obj, java.lang.Object repl) { if (obj instanceof net.minecraft.item.Item) { cpw.mods.fml.common.registry.RegistryDelegate<net.minecraft.item.Item> delegate = ((net.minecraft.item.Item) (obj)).delegate; cpw.mods.fml.relauncher.ReflectionHelper.setPri...
private static void alterDelegate(java.lang.Object obj, java.lang.Object repl) { if (obj instanceof net.minecraft.item.Item) { cpw.mods.fml.common.registry.RegistryDelegate<net.minecraft.item.Item> delegate = ((net.minecraft.item.Item) (obj)).delegate; cpw.mods.fml.relauncher.ReflectionHelper.setPri...
public void testRetrievingNonExistentContactsById() { spec.ContactManager contactManager = new impl.ContactManagerImpl(); int contactId1 = contactManager.addNewContact("John", "A note about John"); try { java.util.Set<spec.Contact> contactsById = contactManager.getContacts(contactId1, 999, 1230); ...
public void testRetrievingNonExistentContactsById() { spec.ContactManager contactManager = new impl.ContactManagerImpl(); int contactId1 = contactManager.addNewContact("John", "A note about John"); try { contactManager.getContacts(contactId1, 999, 1230); } catch (java.lang.IllegalArgumentExcepti...
public int compareTo(eu.transkribus.core.model.beans.TrpDocMetadata md) { if ((this.getDocId()) > (md.getDocId())) { return 1; } if ((md.getDocId()) < (md.getDocId())) { return -1; } return 0; }
public int compareTo(eu.transkribus.core.model.beans.TrpDocMetadata md) { if ((this.getDocId()) > (md.getDocId())) { return 1; } if ((this.getDocId()) < (md.getDocId())) { return -1; } return 0; }
private org.restlet.representation.Representation updateTableMetadata(@com.linkedin.pinot.controller.api.swagger.Parameter(name = "tableName", in = "path", description = "The name of the table for which to update the metadata configuration", required = true) java.lang.String tableName, org.restlet.representation.Repres...
private org.restlet.representation.Representation updateTableMetadata(@com.linkedin.pinot.controller.api.swagger.Parameter(name = "tableName", in = "path", description = "The name of the table for which to update the metadata configuration", required = true) java.lang.String tableName, org.restlet.representation.Repres...
public static java.lang.String describeMatcherAsDisplay(android.support.test.uiautomator.UiObject2 uiObject) { java.lang.String display = edu.colorado.plv.chimp.components.ActivityManager.getResEntryName(uiObject.getResourceName()); if (display == null) "Content Desc: ".concat(uiObject.getContentDescrip...
public static java.lang.String describeMatcherAsDisplay(android.support.test.uiautomator.UiObject2 uiObject) { java.lang.String display = edu.colorado.plv.chimp.components.ActivityManager.getResEntryName(uiObject.getResourceName()); if (display == null) display = "Content Desc: ".concat(uiObject.getCont...
private boolean setupConn() throws java.sql.SQLException { boolean res = false; setDb(pad, dName); try { conn = java.sql.DriverManager.getConnection(db); if ((conn) != null) { res = true; } } catch (java.sql.SQLException e) { throw new java.sql.SQLException(e)...
private boolean setupConn() throws java.sql.SQLException { java.lang.System.out.println(dName); boolean res = false; setDb(pad, dName); try { conn = java.sql.DriverManager.getConnection(db); if ((conn) != null) { res = true; } } catch (java.sql.SQLException e) { ...
public static void validateCategory(io.reactivesw.model.Reference category) { if (((category == null) || (!(category.getTypeId().equals(ReferenceTypes.CATEGORY.toString())))) || (org.apache.commons.lang3.StringUtils.isBlank(category.getId()))) { io.reactivesw.product.infrastructure.validator.CategoryValidat...
public static void validateCategory(io.reactivesw.model.Reference category) { if (((category == null) || (!(category.getTypeId().equals(ReferenceTypes.CATEGORY.getType())))) || (org.apache.commons.lang3.StringUtils.isBlank(category.getId()))) { io.reactivesw.product.infrastructure.validator.CategoryValidato...
public void testJokeDownload() { com.udacity.gradle.builditbigger.AsyncTaskJokes endpointsAsyncTask = new com.udacity.gradle.builditbigger.AsyncTaskJokes(getContext(), true); com.udacity.gradle.builditbigger.MainActivityFragment fragment = new com.udacity.gradle.builditbigger.MainActivityFragment(); endpoin...
public void testJokeDownload() { com.udacity.gradle.builditbigger.AsyncTaskJokes endpointsAsyncTask = new com.udacity.gradle.builditbigger.AsyncTaskJokes(getContext(), true); com.udacity.gradle.builditbigger.MainActivityFragment fragment = new com.udacity.gradle.builditbigger.MainActivityFragment(); endpoin...
public static java.util.Properties addDeserializerToConfig(java.util.Properties properties, org.apache.kafka.common.serialization.Deserializer<?> keyDeserializer, org.apache.kafka.common.serialization.Deserializer<?> valueDeserializer) { java.util.Properties newProperties = new java.util.Properties(); newProper...
public static java.util.Properties addDeserializerToConfig(java.util.Properties properties, org.apache.kafka.common.serialization.Deserializer<?> keyDeserializer, org.apache.kafka.common.serialization.Deserializer<?> valueDeserializer) { java.util.Properties newProperties = new java.util.Properties(); newProper...
public byte[] get(byte[] key) { byte[] result = null; byte[] byteKey = key; try { result = db.get(byteKey); } catch (com.yahoo.ads.pb.store.RocksDBException e) { logger.debug("error getting key {}", key, e); } return result; }
public byte[] get(byte[] key) { byte[] result = null; byte[] byteKey = key; try { result = db.get(byteKey); } catch (com.yahoo.ads.pb.store.RocksDBException e) { logger.debug("error getting key {}", key, e); } catch (java.lang.Exception e) { logger.debug("error getting key {}...
public int selectedLandmark(final double[] ptarray, final boolean isMoving) { int selectedPointIndex = -1; if ((isMoving && ((landmarkModel.getTransform()) != null)) && (isMovingDisplayTransformed())) { landmarkModel.getTransform().apply(ptarray, ptBack); selectedPointIndex = selectedLandmarkHel...
public int selectedLandmark(final double[] ptarray, final boolean isMoving) { int selectedPointIndex = -1; if ((isMoving && ((landmarkModel.getTransform()) != null)) && (!(isMovingDisplayTransformed()))) { landmarkModel.getTransform().apply(ptarray, ptBack); selectedPointIndex = selectedLandmark...
protected java.util.ArrayList<com.muyunluan.bakingapp.data.BakingRecipe> doInBackground(java.lang.Void... params) { try { java.lang.String jsonRecipeResponse = com.muyunluan.bakingapp.utils.NetworkUtils.getResponseFromHttpUrl(OpenRecipeJsonUtils.RECIPE_URL); com.muyunluan.bakingapp.utils.OpenRecipeJ...
protected java.util.ArrayList<com.muyunluan.bakingapp.data.BakingRecipe> doInBackground(java.lang.Void... params) { try { java.lang.String jsonRecipeResponse = com.muyunluan.bakingapp.utils.NetworkUtils.getResponseFromHttpUrl(OpenRecipeJsonUtils.RECIPE_URL); com.muyunluan.bakingapp.utils.OpenRecipeJ...
public void setName(java.lang.String newName) { if ((names) == null) { names = new java.util.ArrayList<java.lang.String>(); } if ((names.size()) > 0) names.set(0, newName); else names.add(newName); }
public void setName(java.lang.String newName) { if ((names) == null) { names = new java.util.ArrayList<java.lang.String>(); } if ((names.size()) > 0) { names.set(0, newName); }else { names.add(newName); } }
public boolean writeAllBack(de.doe300.activerecord.store.impl.CachedJDBCRecordStore store) { if ((cachedRows.isEmpty()) || (!(dataChanged))) { return false; } boolean changed = false; for (de.doe300.activerecord.store.impl.RowCache cache : cachedRows.values()) { if (cache.writeBack(store...
public boolean writeAllBack(de.doe300.activerecord.store.impl.CachedJDBCRecordStore store) { if ((cachedRows.isEmpty()) || (!(dataChanged))) { return false; } boolean changed = false; synchronized(cachedRows) { for (de.doe300.activerecord.store.impl.RowCache cache : cachedRows.values()) ...
public void onAnimationUpdate(android.animation.ValueAnimator animation) { if ((arcStore.getProgress()) >= offset) { arcStore.setProgress(offset); }else { arcStore.setProgress(java.lang.Math.round(((arcStore.getProgress()) + ((offset * ((float) (animation.getAnimatedValue()))) / (animation.getDu...
public void onAnimationUpdate(android.animation.ValueAnimator animation) { if ((arcStore.getProgress()) >= offset) { arcStore.setProgress(offset); }else { arcStore.setProgress(java.lang.Math.round(((arcStore.getProgress()) + ((float) (animation.getAnimatedValue()))))); } }
public java.lang.Object apply(java.util.List args) { if (((args.get(0)) == (lispy.Environment.FALSE)) && ((args.get(1)) == (lispy.Environment.FALSE))) { return lispy.Environment.FALSE; }else { return args.get(0); } }
public java.lang.Object apply(java.util.List args) { if ((args.get(0).equals(lispy.Environment.FALSE)) && (args.get(1).equals(lispy.Environment.FALSE))) { return lispy.Environment.FALSE; }else { if (args.get(0).equals(lispy.Environment.FALSE)) { return args.get(1); }else { ...
public void log(LogManager.Type type, java.lang.String string) { if ((type == (LogManager.Type.ALL)) || (type == (this.type))) { if (filter.filter_message(string)) handler.writeMessage(string); } if (((loggers) != null) && (!(loggers.isEmpty()))) for (Logger log : logger...
public void log(LogManager.Type type, java.lang.String string) { if (((type.getValue()) >= (this.type.getValue())) && ((handler) != null)) { if ((filter) != null) { if (filter.filter_message(string)) { handler.writeMessage(string); } }else { handle...
public boolean isItemValidForSlot(int index, net.minecraft.item.ItemStack stack) { if (index > (slotsInput)) { return false; } if ((inventory[index]) != null) { if (((inventory[index].getItem()) == (stack.getItem())) && ((inventory[index].stackSize) < (inventory[index].getMaxStackSize()))) {...
public boolean isItemValidForSlot(int index, net.minecraft.item.ItemStack stack) { if (index >= (slotsInput)) { return false; } if ((inventory[index]) != null) { if (((inventory[index].getItem()) == (stack.getItem())) && ((inventory[index].stackSize) < (inventory[index].getMaxStackSize()))) ...
public void testNeedsCoverageByArtifactType() { final openfasttrack.core.SpecificationItem.Builder builder = new openfasttrack.core.SpecificationItem.Builder(); builder.id(openfasttrack.core.TestSpecificationItem.ARTIFACT_TYPE, openfasttrack.core.TestSpecificationItem.NAME, openfasttrack.core.TestSpecificationI...
public void testNeedsCoverageByArtifactType() { final openfasttrack.core.SpecificationItem.Builder builder = new openfasttrack.core.SpecificationItem.Builder(); builder.id(openfasttrack.core.TestSpecificationItem.ARTIFACT_TYPE, openfasttrack.core.TestSpecificationItem.NAME, openfasttrack.core.TestSpecificationI...
public static test.klq.logic.controller.Question q5() { test.klq.logic.controller.Id id = new test.klq.logic.controller.Id("question5"); test.klq.logic.controller.OptionSet optionSet = new test.klq.logic.controller.OptionSet(); optionSet.add(new test.klq.logic.controller.Answer("So n grote Feuerball!")); ...
public static test.klq.logic.controller.Question q5() { test.klq.logic.controller.Id id = new test.klq.logic.controller.Id("question5"); test.klq.logic.controller.OptionSet optionSet = new test.klq.logic.controller.OptionSet(); optionSet.add(new java.lang.String("So n grote Feuerball!")); optionSet.add(...
public void onConnectionEnd() { connectButton.setText("Connect"); if (onDemandCheckBox.isSelected()) { connectButtonActionPerformed(null); } startButton.setEnabled(false); serverStatusLabel.setText("disconnected"); timer.cancel(); timer.purge(); }
public void onConnectionEnd() { timer.cancel(); timer.purge(); connectButton.setText("Connect"); if (onDemandCheckBox.isSelected()) { connectButtonActionPerformed(null); } startButton.setEnabled(false); serverStatusLabel.setText("disconnected"); }
public void run() { AI(); move(); if (((((int) (x)) != (lx)) || (((int) (y)) != (ly))) || ((lgen) != (Display.gen))) { lx = ((int) (x)); ly = ((int) (y)); lgen = Display.gen; core.Display.addToDrawQueue(this); } (gen)++; }
public void run() { AI(); move(); if (((((int) (x)) != (lx)) || (((int) (y)) != (ly))) || ((lgen) != (Display.gen))) { lx = ((int) (x)); ly = ((int) (y)); lgen = Display.gen; } (gen)++; }
public android.database.Cursor getWordByC_id(java.lang.Integer c_id1) { java.lang.Integer c_id = c_id1; java.lang.String query = "SELECT chin_word,tone FROM CHAR_TABLE WHERE CHAR_TABLE.c_id = " + c_id1; android.database.Cursor cursor = mDb.rawQuery(query, null); cursor.moveToFirst(); if (cursor != n...
public android.database.Cursor getWordByC_id(java.lang.Integer c_id1) { java.lang.Integer c_id = c_id1; java.lang.String query = "SELECT chin_word,tone FROM CHAR_TABLE WHERE CHAR_TABLE.c_id = " + c_id; android.database.Cursor cursor = mDb.rawQuery(query, null); cursor.moveToFirst(); if (cursor != nu...
public void increasePrice(int percentage) { java.util.List<springmvc_ims.model.Product> products = productDao.queryAllAsList(); if (products != null) { for (springmvc_ims.model.Product product : products) { double newPrice = ((product.getPrice().doubleValue()) * (100 + percentage)) / 100; ...
public void increasePrice(int percentage) { java.util.List<springmvc_ims.model.Product> products = productDao.queryAllAsList(); if (products != null) { for (springmvc_ims.model.Product product : products) { double newPrice = ((product.getPrice().doubleValue()) * (100 + percentage)) / 100; ...
public void setConfig(java.util.HashMap<java.lang.String, java.lang.Object> config) { this.config = config; java.lang.Boolean debug = ((java.lang.Boolean) (this.config.get("debug"))); if (debug != null) { this.DEBUG = debug; } }
public void setConfig(java.util.HashMap<java.lang.String, java.lang.Object> config) { if (config == null) { return ; } this.config = config; java.lang.Boolean debug = ((java.lang.Boolean) (this.config.get("debug"))); if (debug != null) { this.DEBUG = debug; } }
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_track); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true); if (savedInstanceState == null) { ...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_track); getSupportActionBar().setDisplayHomeAsUpEnabled(true); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction().add(R.id.trackConta...
private com.sonicle.webtop.core.sdk.UserProfileId storeToOwner(int storeId) { synchronized(cacheOwnerByStore) { if (cacheOwnerByStore.containsKey(storeId)) { return cacheOwnerByStore.get(storeId); }else { try { com.sonicle.webtop.core.sdk.UserProfileId owner =...
private com.sonicle.webtop.core.sdk.UserProfileId storeToOwner(int storeId) { synchronized(cacheOwnerByStore) { if (cacheOwnerByStore.containsKey(storeId)) { return cacheOwnerByStore.get(storeId); }else { try { com.sonicle.webtop.core.sdk.UserProfileId owner =...
public void checkInvalidType(java.lang.String typeName) throws org.eclipse.ocl.ParserException { for (net.menthor.tocl.parser.RefOntoUML.Element elem : umap.keySet()) { if (elem instanceof net.menthor.tocl.parser.RefOntoUML.NamedElement) { net.menthor.tocl.parser.RefOntoUML.NamedElement namedEle...
public void checkInvalidType(java.lang.String typeName) throws org.eclipse.ocl.ParserException { for (net.menthor.tocl.parser.RefOntoUML.Element elem : umap.keySet()) { if (elem instanceof net.menthor.tocl.parser.RefOntoUML.NamedElement) { net.menthor.tocl.parser.RefOntoUML.NamedElement namedEle...
private void newConfig(java.io.File file) { try { if (!(plugin.getDataFolder().exists())) { plugin.getDataFolder().mkdir(); } plugin.saveResource(CONFIG_PATH, true); plugin.getLogger().info("Config extracted successfully!"); } catch (java.lang.Exception e) { e...
private void newConfig(java.io.File file) { try { if (!(plugin.getDataFolder().exists())) { plugin.getDataFolder().mkdir(); } plugin.saveResource(CONFIG_PATH, true); plugin.getLogger().info("Config extracted successfully!"); } catch (java.lang.Exception e) { e...
public dictionary.APIType getTypeByFullName(java.lang.String name) { java.lang.String simpleName = name.substring(((name.lastIndexOf('.')) + 1)); java.util.HashSet<dictionary.APIType> types = this.getTypesByName(simpleName); for (dictionary.APIType type : types) { if (type.getFQN().equals(name)) { ...
public dictionary.APIType getTypeByFullName(java.lang.String name) { java.lang.String simpleName = name.substring(((name.lastIndexOf('.')) + 1)); java.util.HashSet<dictionary.APIType> types = this.getTypesByName(simpleName); if (types != null) { for (dictionary.APIType type : types) { if...
public void testGetLinkType() { org.junit.Assume.assumeFalse(java.awt.GraphicsEnvironment.isHeadless()); testNew(); org.junit.Assert.assertEquals(ltRH.getLinkType(), LayoutTurnout.NO_LINK); org.junit.Assert.assertEquals(ltLH.getLinkType(), LayoutTurnout.NO_LINK); org.junit.Assert.assertEquals(ltWY.g...
public void testGetLinkType() { testNew(); org.junit.Assert.assertEquals(ltRH.getLinkType(), LayoutTurnout.NO_LINK); org.junit.Assert.assertEquals(ltLH.getLinkType(), LayoutTurnout.NO_LINK); org.junit.Assert.assertEquals(ltWY.getLinkType(), LayoutTurnout.NO_LINK); org.junit.Assert.assertEquals(ltDX....
public boolean handleMessage(final android.os.Message msg) { switch (msg.what) { case jarp.mx.com.basichandler.MainActivity.OperationInBackGround : jarp.mx.com.basichandler.MessageText messageText = ((jarp.mx.com.basichandler.MessageText) (msg.obj)); android.os.Handler mainUi = messa...
public boolean handleMessage(final android.os.Message msg) { switch (msg.what) { case jarp.mx.com.basichandler.MainActivity.OperationInBackGround : jarp.mx.com.basichandler.MessageText messageText = ((jarp.mx.com.basichandler.MessageText) (msg.obj)); android.os.Handler mainUi = messa...
private void startList() { final android.content.Intent intent = new android.content.Intent(getApplicationContext(), com.sinch.messagingtutorialskeleton.ListUserActivity.class); final android.content.Intent serviceIntent = new android.content.Intent(getApplicationContext(), com.sinch.messagingtutorialskeleton.M...
private void startList() { final android.content.Intent intent = new android.content.Intent(getApplicationContext(), com.sinch.messagingtutorialskeleton.ListUserActivity.class); final android.content.Intent serviceIntent = new android.content.Intent(getApplicationContext(), com.sinch.messagingtutorialskeleton.M...
private org.jetbrains.kotlin.ui.editors.annotations.DiagnosticAnnotation createKotlinAnnotation(@org.jetbrains.annotations.NotNull org.jetbrains.kotlin.diagnostics.Diagnostic diagnostic, @org.jetbrains.annotations.NotNull org.eclipse.core.resources.IFile file) { com.intellij.openapi.util.TextRange range = diagnosti...
private org.jetbrains.kotlin.ui.editors.annotations.DiagnosticAnnotation createKotlinAnnotation(@org.jetbrains.annotations.NotNull org.jetbrains.kotlin.diagnostics.Diagnostic diagnostic, @org.jetbrains.annotations.NotNull org.eclipse.core.resources.IFile file) { com.intellij.openapi.util.TextRange range = diagnosti...
private void onRetry(java.lang.Throwable ex, final int retryTimes, final long soFarBytes) { if (com.liulishuo.filedownloader.util.FileDownloadLog.NEED_LOG) { com.liulishuo.filedownloader.util.FileDownloadLog.d(this, "On retry %d %s %d %d", getId(), ex, retryTimes, autoRetryTimes); } ex = exFiltrate(...
private void onRetry(java.lang.Throwable ex, final int retryTimes, final long soFarBytes) { if (com.liulishuo.filedownloader.util.FileDownloadLog.NEED_LOG) { com.liulishuo.filedownloader.util.FileDownloadLog.d(this, "On retry %d %s %d %d", getId(), ex, retryTimes, autoRetryTimes); } ex = exFiltrate(...
public void showElementInfo(de.blau.android.osm.OsmElement element) { android.support.v4.app.FragmentManager fm = getSupportFragmentManager(); android.support.v4.app.FragmentTransaction ft = fm.beginTransaction(); android.support.v4.app.Fragment prev = fm.findFragmentByTag("fragment_element_info"); if (...
public void showElementInfo(de.blau.android.osm.OsmElement element) { android.support.v4.app.FragmentManager fm = getSupportFragmentManager(); android.support.v4.app.FragmentTransaction ft = fm.beginTransaction(); android.support.v4.app.Fragment prev = fm.findFragmentByTag("fragment_element_info"); if (...
public static void main(java.lang.String[] args) { model.Font.prepare(); execution.Runner.frame = new javax.swing.JFrame(); viewModel.MainViewModel mainViewModel = new viewModel.MainViewModel(); execution.Runner.frame.setSize(900, 400); execution.Runner.frame.setDefaultCloseOperation(javax.swing.JFr...
public static void main(java.lang.String[] args) { model.Font.prepare(); execution.Runner.frame = new javax.swing.JFrame(); viewModel.MainViewModel mainViewModel = new viewModel.MainViewModel(); execution.Runner.frame.setSize(900, 400); execution.Runner.frame.setDefaultCloseOperation(javax.swing.JFr...
public void onClick(android.content.DialogInterface dialog, int id) { android.widget.Toast.makeText(this, "You clicked Yes", Toast.LENGTH_SHORT).show(); com.snippet.snippet.controller.DatabaseUtils.setAutoTaggedFromFilePath(this, mFilePath, true); com.snippet.snippet.view.ImageViewerActivity.stopwatchStart ...
public void onClick(android.content.DialogInterface dialog, int id) { android.widget.Toast.makeText(this, "You clicked Yes", Toast.LENGTH_SHORT).show(); com.snippet.snippet.view.ImageViewerActivity.stopwatchStart = java.lang.System.currentTimeMillis(); new java.lang.Thread(new java.lang.Runnable() { ...
public void done(java.util.List<com.parse.ParseObject> list, com.parse.ParseException e) { if (e == null) { for (int i = 0; i < (list.size()); i++) { searchableUsers.add(((java.lang.String) (list.get(i).get("username")))); } } }
public void done(java.util.List<com.parse.ParseObject> list, com.parse.ParseException e) { for (int i = 0; i < (list.size()); i++) { searchableUsers.add(((java.lang.String) (list.get(i).get("username")))); } }
public com.libertymutual.goforcode.blackjackpractice.models.Card drawCard() { com.libertymutual.goforcode.blackjackpractice.models.Card card; if ((deck.size()) > 0) { card = deck.get(((deck.size()) - 1)); deck.remove(((deck.size()) - 1)); }else { java.lang.System.out.println("The dec...
public com.libertymutual.goforcode.blackjackpractice.models.Card drawCard() { com.libertymutual.goforcode.blackjackpractice.models.Card card; if ((deck.size()) > 0) { card = deck.get(((deck.size()) - 1)); deck.remove(((deck.size()) - 1)); }else { java.lang.System.err.println("The dec...
public java.lang.String get(java.lang.String key) { java.lang.String value = null; try { value = com.ucas.hcache.memcached.MemCached.mc.get(key); } catch (java.util.concurrent.TimeoutException e) { e.printStackTrace(); } catch (java.lang.InterruptedException e) { e.printStackTrac...
public java.lang.String get(java.lang.String key) { java.lang.String value = null; try { value = com.ucas.hcache.memcached.MemCached.mc.get(key); } catch (java.util.concurrent.TimeoutException e) { e.printStackTrace(); } catch (java.lang.InterruptedException e) { e.printStackTrac...
public void run() { try { java.net.ServerSocket serverSocket = new java.net.ServerSocket(Server.PORT); boolean running = true; while (running) { java.net.Socket socket = serverSocket.accept(); _queue.offer(new Server.ObjectSocket(socket)); java.lang.System...
public void run() { try { java.net.ServerSocket serverSocket = new java.net.ServerSocket(Server.PORT); boolean running = true; while (running) { java.net.Socket socket = serverSocket.accept(); _queue.offer(new Server.ObjectSocket(socket)); java.lang.System...
public void processUserInput() throws bence.game2048.GameInterruptedException { while (true) { switch (readFromConsole()) { case bence.game2048.Game2048.KEY_LEFT : left(); break; case bence.game2048.Game2048.KEY_RIGHT : right(); ...
public void processUserInput() throws bence.game2048.GameInterruptedException { switch (readFromConsole()) { case bence.game2048.Game2048.KEY_LEFT : left(); break; case bence.game2048.Game2048.KEY_RIGHT : right(); break; case bence.game2048.Gam...
private static int paethP(int a, int b, int c) { int pa = b - c; int pb = a - c; int pc = pa + pb; pa = lwjPNG.LwjPNG.ab(pa); pb = lwjPNG.LwjPNG.ab(pb); pc = lwjPNG.LwjPNG.ab(pc); return (pa <= pb) && (pa <= pc) ? a : pb <= pc ? b : c; }
private static int paethP(int a, int b, int c) { int pa = b - c; int pb = a - c; int pc = lwjPNG.LwjPNG.ab((pa + pb)); pa = lwjPNG.LwjPNG.ab(pa); pb = lwjPNG.LwjPNG.ab(pb); return (pa <= pb) && (pa <= pc) ? a : pb <= pc ? b : c; }
public void selectionChanged(final java.util.Collection<? extends org.openstreetmap.josm.data.osm.OsmPrimitive> sel) { org.openstreetmap.josm.plugins.mapillary.gui.imageinfo.ImageInfoPanel.L.debug(java.lang.String.format("Selection changed. %d primitives are selected.", sel.size())); synchronized(sel) { ...
public synchronized void selectionChanged(final java.util.Collection<? extends org.openstreetmap.josm.data.osm.OsmPrimitive> sel) { org.openstreetmap.josm.plugins.mapillary.gui.imageinfo.ImageInfoPanel.L.debug(java.lang.String.format("Selection changed. %d primitives are selected.", (sel == null ? 0 : sel.size())))...
public void run() { while (locationStatusOn) { try { ((northseattlecollege.ASLBuddy.MenuInterpreter) (menuInterpreter)).sendLocationToServer(); java.lang.System.out.println("test"); java.lang.Thread.sleep((360 * 1000)); } catch (java.lang.Exception e) { ...
public void run() { while (locationStatusOn) { try { ((northseattlecollege.ASLBuddy.MenuInterpreter) (menuInterpreter)).sendLocationToServer(); java.lang.Thread.sleep((360 * 1000)); } catch (java.lang.Exception e) { e.printStackTrace(); } } }
protected void clientResponse(java.lang.String s) { int i = java.lang.Integer.parseInt(s); switch (i) { case 1 : swapAcces(services.AccesServices.class); break; case 2 : break; case 3 : break; case 4 : break; cas...
protected void clientResponse(java.lang.String s) { s.trim(); int i = java.lang.Integer.parseInt(s); switch (i) { case 1 : swapAcces(services.AccesServices.class); break; case 2 : break; case 3 : break; case 4 : brea...
protected void onSaveInstanceState(android.os.Bundle outState) { super.onSaveInstanceState(outState); com.example.prusp.booklistingappwithoutlibraries.Book[] values = new com.example.prusp.booklistingappwithoutlibraries.Book[adapter.getCount()]; for (int i = 0; i < (values.length); i++) { values[i] ...
protected void onSaveInstanceState(android.os.Bundle outState) { super.onSaveInstanceState(outState); com.example.prusp.booklistingappwithoutlibraries.Book[] values = new com.example.prusp.booklistingappwithoutlibraries.Book[adapter.getCount()]; for (int i = 0; i < (values.length); i++) { values[i] ...
public void declineFriendInvite() throws java.io.IOException { org.junit.Assert.assertEquals(true, com.restfind.restaurantfinder.Database.declineFriendInvite("Alex", "Pia")); org.junit.Assert.assertEquals(true, com.restfind.restaurantfinder.Database.declineFriendInvite("Alex", "Max")); org.junit.Assert.asse...
public void declineFriendInvite() throws java.io.IOException { org.junit.Assert.assertEquals(true, com.restfind.restaurantfinder.Database.declineFriendInvite("Alex", "Pia")); org.junit.Assert.assertEquals(true, com.restfind.restaurantfinder.Database.declineFriendInvite("Alex", "Max")); org.junit.Assert.asse...
public org.kframework.krun.api.SearchResults search() throws org.kframework.krun.KRunExecutionException, org.kframework.utils.errorsystem.ParseFailedException { org.kframework.kil.ASTNode pattern = pattern(options.pattern); org.kframework.krun.tools.Executor.Tool.SearchPattern searchPattern = new org.kframework...
public org.kframework.krun.api.SearchResults search() throws org.kframework.krun.KRunExecutionException, org.kframework.utils.errorsystem.ParseFailedException { org.kframework.kil.ASTNode pattern = pattern(options.pattern); org.kframework.krun.tools.Executor.Tool.SearchPattern searchPattern = new org.kframework...
public void onClick(android.view.View v) { android.widget.Toast.makeText(v.getContext(), "edit clicked", Toast.LENGTH_LONG).show(); com.example.zhenyu.babyrecordapplication.Models.BabyGrowthRecord growthRec = listData.get(position); java.lang.System.out.println(("growth id: " + (growthRec.getGrowthId()))); ...
public void onClick(android.view.View v) { android.widget.Toast.makeText(v.getContext(), "edit clicked", Toast.LENGTH_LONG).show(); com.example.zhenyu.babyrecordapplication.Models.BabyGrowthRecord growthRec = listData.get(position); android.content.Intent addActivityIntent = new android.content.Intent(conte...
public java.lang.Long getTotalSpentTimeForIssueByAllUsers(java.lang.Long issueId) { java.lang.Long totalSpentTime = new java.lang.Long(0); java.util.List<com.softserverinc.edu.entities.WorkLog> workLogList = findByIssue(getCurrentIssue(issueId)); for (com.softserverinc.edu.entities.WorkLog worklogIterator :...
private java.lang.Long getTotalSpentTimeForIssueByAllUsers(java.lang.Long issueId) { java.lang.Long totalSpentTime = new java.lang.Long(0); java.util.List<com.softserverinc.edu.entities.WorkLog> workLogList = findByIssue(getCurrentIssue(issueId)); for (com.softserverinc.edu.entities.WorkLog worklogIterator ...
private android.widget.LinearLayout createSection(java.lang.Integer turnNumber) { android.view.LayoutInflater layoutInflater = android.view.LayoutInflater.from(view.getContext()); android.widget.LinearLayout section = ((android.widget.LinearLayout) (layoutInflater.inflate(R.layout.section, layoutHolder, false))...
private android.widget.LinearLayout createSection(java.lang.Integer turnNumber) { android.view.LayoutInflater layoutInflater = android.view.LayoutInflater.from(getContext()); android.widget.LinearLayout section = ((android.widget.LinearLayout) (layoutInflater.inflate(R.layout.section, layoutHolder, false))); ...
public void testCNRS() throws java.lang.Exception { org.speedd.TimedEventFileReader eventReader = new org.speedd.TimedEventFileReader(org.speedd.TestTrafficManagement.class.getClassLoader().getResource("simulator_data_incident_short.csv").getPath(), "speedd-traffic-in-events", createProducerConfig(), new org.speedd...
public void testCNRS() throws java.lang.Exception { org.speedd.TimedEventFileReader eventReader = new org.speedd.TimedEventFileReader(org.speedd.TestTrafficManagement.class.getClassLoader().getResource("simulator_data_incident_short.csv").getPath(), "speedd-traffic-in-events", createProducerConfig(), new org.speedd...
public void refresh() { if (!(this.isVisible())) { this.setVisible(true); } frames.HomePanel np = new frames.HomePanel(); java.awt.Point point = this.getLocationOnScreen(); np.setLocation(((int) (point.getX())), ((int) (point.getY()))); np.setVisible(true); this.dispose(); }
public void refresh() { if (!(this.isVisible())) { this.setVisible(true); } frames.HomePanel np = new frames.HomePanel(); java.awt.Point point = this.getLocationOnScreen(); np.setLocation(((int) (point.getX())), ((int) (point.getY()))); np.setVisible(true); this.setVisible(false); ...
public ru.osslabs.model.datasource.MetaObject getReferenceMetaObject(ru.osslabs.model.datasource.MetaObject metaObject, java.lang.String fieldName) { ru.osslabs.model.datasource.MetaObject result = null; if (metaObject.getChildren().containsKey(fieldName)) { result = metaObject.getChildren().get(fieldNa...
public ru.osslabs.model.datasource.MetaObject getReferenceMetaObject(ru.osslabs.model.datasource.MetaObject metaObject, java.lang.String fieldName) { ru.osslabs.model.datasource.MetaObject result = null; if (metaObject != null) { if (metaObject.getChildren().containsKey(fieldName)) { result ...
public void root() { sleep(1000); javafx.scene.control.TreeItem<java.lang.String> root = fileExplorer.getTreeView().getRoot(); assert root != null; assert root instanceof org.roda.rodain.source.ui.items.SourceTreeDirectory; assert ((org.roda.rodain.source.ui.items.SourceTreeDirectory) (root)).getPat...
public void root() { sleep(1000); javafx.scene.control.TreeItem<java.lang.String> root = fileExplorer.getTreeView().getRoot().getChildren().get(0); assert root != null; assert root instanceof org.roda.rodain.source.ui.items.SourceTreeDirectory; assert ((org.roda.rodain.source.ui.items.SourceTreeDire...
public static boolean operator_greaterThan(org.eclipse.smarthome.core.types.Type type, java.lang.Number x) { if ((type != null) && (type instanceof org.eclipse.smarthome.core.library.types.DecimalType)) { return (((org.eclipse.smarthome.core.library.types.DecimalType) (type)).toBigDecimal().compareTo(org.ec...
public static boolean operator_greaterThan(org.eclipse.smarthome.core.types.Type type, java.lang.Number x) { if (((type != null) && (type instanceof org.eclipse.smarthome.core.library.types.DecimalType)) && (x != null)) { return (((org.eclipse.smarthome.core.library.types.DecimalType) (type)).toBigDecimal()...
public void applyForegroundColor(int color) { typing_fg = color; typingEffects.add(RichEditText.FOREGROUND); if ((getSelectionEnd()) <= (getText().length())) applyEffect(RichEditText.FOREGROUND, color); splitInactiveSpans(getText(), getSelectionStart(), getSelectionEnd(), 0); super.onSe...
public void applyForegroundColor(int color) { typing_fg = color; typingEffects.add(RichEditText.FOREGROUND); if ((getSelectionEnd()) <= (getText().length())) applyEffect(RichEditText.FOREGROUND, color); splitInactiveSpans(getText(), getSelectionStart(), getSelectionEnd()); super.onSelec...
public int hashCode() { int result = 17; result = (31 * result) + (first.hashCode()); result = (31 * result) + (second.hashCode()); result = (31 * result) + (core.Edge.double_hash_code(weight)); return result; }
public int hashCode() { int result = 17; result = (31 * result) + ((first) == null ? 0 : first.hashCode()); result = (31 * result) + (second.hashCode()); result = (31 * result) + (core.Edge.double_hash_code(weight)); return result; }
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.modify_layout); setViewByLayout(); java.util.List<com.example.furry_octo_waddle.sql_manager.Word_Translation> list = action.getWordFromTable(new com.example.furry_octo_waddle.sql_mana...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.modify_layout); setViewByLayout(); java.util.List<com.example.furry_octo_waddle.sql_manager.Word_Translation> list = action.getWordFromTable(action.query(getIntent().getExtras().getIn...
mHistoryList = ((android.support.v7.widget.RecyclerView) (v.findViewById(R.id.history_list))); layoutManager = new android.support.v7.widget.LinearLayoutManager(getActivity()); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); mHistoryList.setLayoutManager(layoutManager); historyListAdapte...
mHistoryList = ((android.support.v7.widget.RecyclerView) (v.findViewById(R.id.history_list))); layoutManager = new android.support.v7.widget.LinearLayoutManager(getActivity()); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); mHistoryList.setLayoutManager(layoutManager); historyListAdapte...
private boolean checkDates(java.lang.String fromDate, java.lang.String toDate) { java.lang.String dateString = "03/26/2012 11:49:00 AM"; java.text.SimpleDateFormat fromDateFormat = new java.text.SimpleDateFormat("dd.MM.yyyy"); java.util.Date fromDateconverted = new java.util.Date(); java.text.SimpleDate...
private boolean checkDates(java.lang.String fromDate, java.lang.String toDate) { java.text.SimpleDateFormat fromDateFormat = new java.text.SimpleDateFormat("dd.MM.yyyy"); java.util.Date fromDateconverted = new java.util.Date(); java.text.SimpleDateFormat toDateFormat = new java.text.SimpleDateFormat("dd.MM....
public void sendToARoom(java.lang.Object msg, java.lang.String room) { java.lang.String message = ((java.lang.String) (msg)); server.Room tempRoom = roomList.getRoom(room); if (!(tempRoom.equals(null))) { java.lang.System.out.println(("Found room " + tempRoom)); for (int r = 0; r < (tempRoom...
public void sendToARoom(java.lang.Object msg, java.lang.String room) { java.lang.String message = ((java.lang.String) (msg)); server.Room tempRoom = roomList.getRoom(room); if (!(tempRoom.equals(null))) { for (int r = 0; r < (tempRoom.size()); r++) { tryToSendToClient(message, tempRoom.g...
public void loadPropertiesFromFileName(final java.lang.String fileName, final java.lang.ClassLoader cl, final java.util.Properties properties) throws java.io.FileNotFoundException, java.io.IOException { final java.io.File d = new java.io.File(fileName); if ((d != null) && (d.exists())) { properties.load...
public void loadPropertiesFromFileName(final java.lang.String fileName, final java.lang.ClassLoader cl, final java.util.Properties properties) throws java.io.FileNotFoundException, java.io.IOException { final java.io.File file = new java.io.File(fileName); if ((file != null) && (file.exists())) { try (j...
public static int getItemBurnTime(net.minecraft.item.ItemStack item) { if (com.vanhal.progressiveautomation.PAConfig.allowPotatos) { if ((item.getItem()) == (net.minecraft.init.Items.POTATO)) return 40; else if ((item.getItem()) == (net.minecraft.init.Items.BAKED_POTATO)) ...
public static int getItemBurnTime(net.minecraft.item.ItemStack item) { if (com.vanhal.progressiveautomation.PAConfig.allowPotatos) { if ((item.getItem()) == (net.minecraft.init.Items.POTATO)) return 40; else if ((item.getItem()) == (net.minecraft.init.Items.BAKED_POTATO)) ...
private org.json.simple.JSONObject constructPrimaryDataJsonById(org.gfbio.model.PrimaryData primaryData) throws com.liferay.portal.NoSuchUserException, com.liferay.portal.kernel.exception.SystemException { org.json.simple.JSONObject json = new org.json.simple.JSONObject(); json.put("primarydataid", primaryData....
private org.json.simple.JSONObject constructPrimaryDataJsonById(org.gfbio.model.PrimaryData primaryData) throws com.liferay.portal.NoSuchUserException, com.liferay.portal.kernel.exception.SystemException { org.json.simple.JSONObject json = new org.json.simple.JSONObject(); json.put("primarydataid", primaryData....
public boolean deleteReference(int id) { com.github.superryhma.miniprojekti.dbc.Dbc.open(); com.github.superryhma.miniprojekti.dao.impl.db.models.ProjectReference pr = com.github.superryhma.miniprojekti.dao.impl.db.models.ProjectReference.findFirst("id = ?", id); deleteTags(pr); deleteAttributes(pr); ...
public boolean deleteReference(int id) { com.github.superryhma.miniprojekti.dbc.Dbc.open(); com.github.superryhma.miniprojekti.dao.impl.db.models.ProjectReference pr = com.github.superryhma.miniprojekti.dao.impl.db.models.ProjectReference.findFirst("id = ?", id); com.github.superryhma.miniprojekti.dbc.Dbc.c...
public void writeObjectBeginPush(int lengthLength) { this.complexFieldStack[((this.complexFieldStackIndex)++)] = this.destIndex; this.dest[((this.destIndex)++)] = ((byte) (255 & (((com.nanosai.gridops.ion.IonFieldTypes.OBJECT) << 4) | lengthLength))); this.destIndex += lengthLength; }
public void writeObjectBeginPush(int lengthLength) { this.complexFieldStack[(++(this.complexFieldStackIndex))] = this.destIndex; this.dest[((this.destIndex)++)] = ((byte) (255 & (((com.nanosai.gridops.ion.IonFieldTypes.OBJECT) << 4) | lengthLength))); this.destIndex += lengthLength; }
public com.smartbear.swagger.SwaggerImporter importSwaggerDefinition(final com.eviware.soapui.impl.wsdl.WsdlProject project, final java.lang.String definitionUrl, final boolean isResourceListing, final java.lang.String defaultMediaType) throws java.lang.Exception { com.smartbear.swagger.SwaggerImporter importer = c...
public com.smartbear.swagger.SwaggerImporter importSwaggerDefinition(final com.eviware.soapui.impl.wsdl.WsdlProject project, final java.lang.String definitionUrl, final java.lang.String defaultMediaType) throws java.lang.Exception { com.smartbear.swagger.SwaggerImporter importer = com.smartbear.swagger.SwaggerUtils...
public void dbShouldReadTodoList() throws java.lang.Exception { todo.javier.mera.todolist.model.TodoList expectedTodoList = createTodoList(); mDataSource.createTodoList(expectedTodoList); todo.javier.mera.todolist.model.TodoList actualTodoList = mDataSource.readTodoLists().get(0); junit.framework.Assert...
public void dbShouldReadTodoList() throws java.lang.Exception { todo.javier.mera.todolist.model.TodoList expectedTodoList = createTodoList(); mDataSource.createTodoList(expectedTodoList, 0); todo.javier.mera.todolist.model.TodoList actualTodoList = mDataSource.readTodoLists().get(0); junit.framework.Ass...
public R call() throws java.lang.Exception { com.github.kmkt.util.concurrent.TaskWorker<T, R> task = null; try { runningTasks.incrementAndGet(); task = workerSupplier.get(); R result = null; if (task != null) { result = task.doTask(req); } return resul...
public R call() throws java.lang.Exception { com.github.kmkt.util.concurrent.TaskWorker<T, R> task = null; try { task = workerSupplier.get(); runningTasks.incrementAndGet(); R result = null; if (task != null) { result = task.doTask(req); } return resul...
public void it_doesnt_return_the_neighbour_on_an_edge_if_we_dont_give_a_valid_vertex() { com.piratesgame.graph.vertices.Vertex v1 = new com.piratesgame.graph.vertices.Vertex("Manchester"); com.piratesgame.graph.vertices.Vertex v2 = new com.piratesgame.graph.vertices.Vertex("Swansea"); com.piratesgame.graph....
public void it_doesnt_return_the_neighbour_on_an_edge_if_we_dont_give_a_valid_vertex() { com.piratesgame.graph.vertices.Vertex v1 = new com.piratesgame.graph.vertices.Vertex("Manchester"); com.piratesgame.graph.vertices.Vertex v2 = new com.piratesgame.graph.vertices.Vertex("Swansea"); com.piratesgame.graph....
public static void insertClothes(java.lang.String[] input, Assignment3.ShoppingCart cart) { java.lang.String name = input[2]; float price = java.lang.Float.parseFloat(input[3]); int quantity = java.lang.Integer.parseInt(input[4]); double weight = java.lang.Double.parseDouble(input[5]); Assignment3.C...
public static void insertClothes(java.lang.String[] input, Assignment3.ShoppingCart cart) { java.lang.String name = input[2]; float price = java.lang.Float.parseFloat(input[3]); int quantity = java.lang.Integer.parseInt(input[4]); int weight = java.lang.Integer.parseInt(input[5]); Assignment3.Clothi...
public void done(com.parse.ParseException e) { progress.dismiss(); if (e == null) { android.widget.Toast.makeText(this, "Successfully updated your favorites teams", Toast.LENGTH_SHORT).show(); }else { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this); ...
public void done(com.parse.ParseException e) { if (e == null) { android.widget.Toast.makeText(this, "Successfully updated your favorites teams", Toast.LENGTH_SHORT).show(); }else { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this); builder.setMessage("So...
protected void updatePlayers() { parent = ((android.widget.LinearLayout) (this.findViewById(R.id.mpWifiLobby_scrollView))); parent.removeAllViews(); count = 0; java.util.List<teamfmg.hangman.OnlineGamePlayer> onlineGamePlayers = db.getAllMultiplayergamePlayers(teamfmg.hangman.MultiplayerWifiLobby.multip...
private void updatePlayers() { parent = ((android.widget.LinearLayout) (findViewById(R.id.mpWifiLobby_scrollView))); parent.removeAllViews(); count = 0; java.util.List<teamfmg.hangman.OnlineGamePlayer> onlineGamePlayers = db.getAllMultiplayergamePlayers(teamfmg.hangman.MultiplayerWifiLobby.multiplayerGa...
private void initDriver() { java.lang.System.setProperty("webdriver.gecko.driver", com.epam.latysheva.SimpleTest.PATH_TO_GEKODRIVER); driver = new org.openqa.selenium.firefox.FirefoxDriver(); java.lang.System.out.println("driver is created"); driver.manage().timeouts().pageLoadTimeout(15, java.util.conc...
private void initDriver() { java.lang.System.setProperty("webdriver.gecko.driver", com.epam.latysheva.SimpleTest.PATH_TO_GEKODRIVER); driver = new org.openqa.selenium.firefox.FirefoxDriver(); driver.manage().timeouts().pageLoadTimeout(15, java.util.concurrent.TimeUnit.SECONDS); driver.manage().timeouts(...
private static int getIntentionOrder(int order, java.util.Collection<java.lang.Long> intentions, java.util.Collection<com.loocha.exam.bean.ExamDecision> decisions) { int num = -1; java.util.List<java.lang.Long> ids = com.loocha.exam.process.IntentionProcessor.getDecisionIds(decisions, order); num = com.looc...
private static int getIntentionOrder(int order, java.util.Collection<java.lang.Long> intentions, java.util.Collection<com.loocha.exam.bean.ExamDecision> decisions) { int num = 0; java.util.List<java.lang.Long> ids = com.loocha.exam.process.IntentionProcessor.getDecisionIds(decisions, order); num = com.looch...
protected void suspend(bgu.spl.a2.Task<?> task) { if ((!(pool.isQueueEmpty(id))) && (!(java.lang.Thread.currentThread().isInterrupted()))) { bgu.spl.a2.Task t = pool.fetchTask(id); pool.submitToProcessor(id, task); t.start(); }else { pool.submitToProcessor(id, task); stea...
protected void suspend(bgu.spl.a2.Task<?> task) { if ((!(pool.isQueueEmpty(id))) && (!(java.lang.Thread.currentThread().isInterrupted()))) { bgu.spl.a2.Task t = pool.fetchTask(id); pool.submitToProcessor(id, task); t.handle(this); }else { pool.submitToProcessor(id, task); ...
public java.lang.Object[] getSubset(int total, int num) { java.lang.System.out.println(total); java.util.Random rand = new java.util.Random(); java.util.List<java.lang.Integer> ret = new java.util.ArrayList<java.lang.Integer>(); int i = 0; int j; while (i < num) { j = rand.nextInt(total)...
public java.lang.Object[] getSubset(int total, int num) { java.util.Random rand = new java.util.Random(); java.util.List<java.lang.Integer> ret = new java.util.ArrayList<java.lang.Integer>(); int i = 0; int j; while (i < num) { j = rand.nextInt(total); if (!(ret.contains(j))) { ...
public void onServiceConnected(android.content.ComponentName componentName, android.os.IBinder service) { mBound = true; android.util.Log.e(edu.nthu.nmsl.itri_app.FragmentActivity.TAG, "onServiceConnected"); mBluetoothLeService = ((edu.nthu.nmsl.itri_app.BluetoothLeService.LocalBinder) (service)).getService...
public void onServiceConnected(android.content.ComponentName componentName, android.os.IBinder service) { mBound = true; mBluetoothLeService = ((edu.nthu.nmsl.itri_app.BluetoothLeService.LocalBinder) (service)).getService(); if (!(mBluetoothLeService.initialize())) { finish(); } mBluetoothLe...