buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private java.lang.String ReadPixelSize() {
org.w3c.dom.NodeList nodes = GetUpperLevelNodeList("PixelSize", "Missing PixelSize.");
java.util.ArrayList<java.lang.String> values = GetNodeListValues(nodes, "Missing PixelSize.");
if ((values.size()) > 0) {
return values.get(0);
}
return null;
} | private int ReadPixelSize() {
org.w3c.dom.NodeList nodes = GetUpperLevelNodeList("PixelSize", "Missing PixelSize.");
java.util.ArrayList<java.lang.String> values = GetNodeListValues(nodes, "Missing PixelSize.");
if ((values.size()) > 0) {
return java.lang.Integer.parseInt(values.get(0));
}
r... |
protected org.bukkit.OfflinePlayer[] get(org.bukkit.event.Event e) {
java.util.UUID uuid = com.wasteofplastic.askyblock.ASkyBlockAPI.getInstance().getTeamLeader(player.getSingle(e).getUniqueId());
if (uuid == null) {
return null;
}else {
return new org.bukkit.OfflinePlayer[]{ fr.nashoba24.wo... | protected org.bukkit.OfflinePlayer[] get(org.bukkit.event.Event e) {
if ((player.getSingle(e)) == null) {
return null;
}
java.util.UUID uuid = com.wasteofplastic.askyblock.ASkyBlockAPI.getInstance().getTeamLeader(player.getSingle(e).getUniqueId());
if (uuid == null) {
return null;
}e... |
public static boolean isInvalidComb(net.minecraft.item.ItemStack stack) {
if ((stack.isEmpty()) || ((stack.getItem()) != (binnie.extrabees.ExtraBees.comb))) {
return true;
}
binnie.extrabees.items.types.EnumHoneyComb honeyComb = binnie.extrabees.items.types.EnumHoneyComb.get(stack);
return !(hon... | public static boolean isInvalidComb(net.minecraft.item.ItemStack stack) {
if (stack.isEmpty()) {
return true;
}
if ((stack.getItem()) != (binnie.extrabees.ExtraBees.comb)) {
return false;
}
binnie.extrabees.items.types.EnumHoneyComb honeyComb = binnie.extrabees.items.types.EnumHoneyC... |
public void onPreviewFrame(byte[] data, android.hardware.Camera camera) {
if ((mDrawerHandler) != null) {
synchronized(mSynOperation) {
if ((isPreviewing) || (isRecording)) {
mDrawerHandler.sendMessage(mDrawerHandler.obtainMessage(com.cgfay.caincamera.core.CameraDrawer.CameraDraw... | public void onPreviewFrame(byte[] data, android.hardware.Camera camera) {
if ((mDrawerHandler) != null) {
synchronized(mSynOperation) {
if ((isPreviewing) || (isRecording)) {
mDrawerHandler.sendMessage(mDrawerHandler.obtainMessage(com.cgfay.caincamera.core.CameraDrawer.CameraDraw... |
public void parse(im.actor.core.api.BserValues values) throws java.io.IOException {
java.util.List<byte[]> _array = values.getRepeatedBytes(1);
this.array = new java.util.ArrayList<im.actor.core.api.ApiRawValue>();
for (int i = 0; i < (values.getRepeatedCount(1)); i++) {
array.add(im.actor.core.api.... | public void parse(im.actor.core.api.BserValues values) throws java.io.IOException {
this.array = new java.util.ArrayList<im.actor.core.api.ApiRawValue>();
for (byte[] b : values.getRepeatedBytes(1)) {
array.add(im.actor.core.api.ApiRawValue.fromBytes(b));
}
} |
public void testH() {
testTaskObject = new common.TaskObject("Travel Eastern Europe and Iceland", "", "", (-1));
testCommandObject = new common.CommandObject(INDEX_EDIT, testTaskObject, 3);
logic.edit.Edit testEdit = new logic.edit.Edit(testCommandObject, logic.edit.EditTest.testList, logic.edit.EditTest.te... | public void testH() {
testTaskObject = new common.TaskObject("Travel Eastern Europe and Iceland", "", "", (-1));
testCommandObject = new common.CommandObject(INDEX_EDIT, testTaskObject, 3);
logic.edit.Edit testEdit = new logic.edit.Edit(testCommandObject, logic.edit.EditTest.testList, logic.edit.EditTest.te... |
public boolean onCreateOptionsMenu(android.view.Menu menu) {
getMenuInflater().inflate(R.menu.menu_gastro_activity, menu);
android.view.MenuItem item = menu.findItem(R.id.action_add_favorite);
boolean isFavorite = org.berlin_vegan.bvapp.GastroLocations.containsFavorite(mGastroLocation.getId());
if (isFa... | public boolean onCreateOptionsMenu(android.view.Menu menu) {
getMenuInflater().inflate(R.menu.menu_gastro_activity, menu);
android.view.MenuItem item = menu.findItem(R.id.action_add_favorite);
boolean isFavorite = org.berlin_vegan.bvapp.GastroLocations.containsFavorite(mGastroLocation.getId());
if (isFa... |
private static void addAsCandidate(final java.util.List<org.activiti.engine.task.Task> taskList, final java.lang.String substitute) {
java.lang.Thread reassignThread = new java.lang.Thread() {
public void run() {
for (org.activiti.engine.task.Task task : taskList) {
org.wso2.carb... | private static void addAsCandidate(final java.util.List<org.activiti.engine.task.Task> taskList, final java.lang.String substitute) {
if ((taskList == null) || (taskList.isEmpty())) {
return ;
}
java.lang.Thread reassignThread = new java.lang.Thread() {
public void run() {
for (o... |
public boolean equals(java.lang.Object that) {
if (that instanceof nl.tudelft.pixelperfect.event.EventParameter) {
nl.tudelft.pixelperfect.event.EventParameter other = ((nl.tudelft.pixelperfect.event.EventParameter) (that));
if ((key) != (other.getKey())) {
return false;
}
... | public boolean equals(java.lang.Object that) {
if (that instanceof nl.tudelft.pixelperfect.event.EventParameter) {
nl.tudelft.pixelperfect.event.EventParameter other = ((nl.tudelft.pixelperfect.event.EventParameter) (that));
if (!(key.equals(other.getKey()))) {
return false;
}
... |
public double[] locateRobot(Point refPoint) {
double yRef = refPoint.getCenterY();
double xRef = refPoint.getCenterX();
double yDistance = yRef - (this.yCenter);
double xDistance = xRef - (this.xCenter);
double[] location = new double[]{ yRef - yDistance , xRef - xDistance };
return location;
} | public double[] locateRobot(Point refPoint) {
double yRef = refPoint.getCenterY();
double xRef = refPoint.getCenterX();
double yDistance = yRef - (this.yCenter);
double xDistance = xRef - (this.xCenter);
double[] location = new double[]{ xRef - xDistance , yRef - yDistance };
return location;
} |
public boolean onNodeLeft(java.util.UUID nodeId) {
for (org.apache.ignite.internal.IgniteInternalFuture<?> fut : futures())
if (isMini(fut)) {
org.apache.ignite.internal.processors.cache.distributed.GridCacheTxRecoveryFuture.MiniFuture f = ((org.apache.ignite.internal.processors.cache.distribute... | public boolean onNodeLeft(java.util.UUID nodeId) {
for (org.apache.ignite.internal.IgniteInternalFuture<?> fut : futures())
if (isMini(fut)) {
org.apache.ignite.internal.processors.cache.distributed.GridCacheTxRecoveryFuture.MiniFuture f = ((org.apache.ignite.internal.processors.cache.distribute... |
private void invoiceValidation(java.math.BigDecimal paymentAmt, java.math.BigDecimal invoiceAmt, java.math.BigDecimal whtAmt) throws java.lang.Exception {
if (paymentAmt.equals(invoiceAmt.subtract(whtAmt)))
return ;
else
throw new java.lang.Exception(((((("ERROR ==> Payment Amount not equal to I... | private void invoiceValidation(java.math.BigDecimal paymentAmt, java.math.BigDecimal invoiceAmt, java.math.BigDecimal whtAmt) throws java.lang.Exception {
if (paymentAmt.equals(invoiceAmt.subtract(whtAmt)))
return ;
else {
throw new java.lang.Exception(((((("ERROR ==> Payment Amount not equal to... |
public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
butterknife.ButterKnife.bind(this.getActivity());
if (getArguments().containsKey(acodexm.futuremindapp.ItemDetailFragment.ARG_ITEM_TITLE)) {
android.app.Activity activity = this.getActivity();
an... | public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments().containsKey(acodexm.futuremindapp.ItemDetailFragment.ARG_ITEM_TITLE)) {
android.app.Activity activity = this.getActivity();
android.support.design.widget.CollapsingToolbarLayout ap... |
public static java.lang.String getContextPath(java.lang.String urlPath) {
java.lang.String contextPath = "";
java.lang.String path = urlPath;
int index = path.indexOf("/services/soap");
if ((index != (-1)) && (index != 0)) {
contextPath = path.substring(0, index);
}
return contextPath;
} | public static java.lang.String getContextPath(java.lang.String urlPath) {
java.lang.String contextPath = "";
if (urlPath != null) {
java.lang.String path = urlPath;
int index = path.indexOf("/services/soap");
if ((index != (-1)) && (index != 0)) {
contextPath = path.substring... |
public java.lang.String getUpdateString() {
net.montoyo.mcef.utilities.Version cur = new net.montoyo.mcef.utilities.Version(net.montoyo.mcef.MCEF.VERSION);
net.montoyo.mcef.utilities.Version cfg = new net.montoyo.mcef.utilities.Version(version);
if (cfg.isBiggerThan(cur))
return ((("New MCEF version... | public java.lang.String getUpdateString() {
if ((version) == null)
return null;
net.montoyo.mcef.utilities.Version cur = new net.montoyo.mcef.utilities.Version(net.montoyo.mcef.MCEF.VERSION);
net.montoyo.mcef.utilities.Version cfg = new net.montoyo.mcef.utilities.Version(version);
if (cfg.i... |
public java.lang.String getMessage(org.bukkit.Material material, int durability) {
if (customMessageMap.containsKey(material)) {
if (customMessageMap.get(material).containsKey(durability)) {
return format(customMessageMap.get(material).get(durability), material);
}else {
retu... | private java.lang.String getMessage(org.bukkit.Material material, int durability) {
if (customMessageMap.containsKey(material)) {
if (customMessageMap.get(material).containsKey(durability)) {
return format(customMessageMap.get(material).get(durability), material);
}else {
ret... |
static java.lang.String createAddressConfig(java.lang.String tagName, com.hazelcast.simulator.protocol.registry.ComponentRegistry componentRegistry, int port) {
java.lang.String members = "";
for (com.hazelcast.simulator.protocol.registry.AgentData agentData : componentRegistry.getAgents()) {
java.lang.... | static java.lang.String createAddressConfig(java.lang.String tagName, com.hazelcast.simulator.protocol.registry.ComponentRegistry componentRegistry, int port) {
java.lang.StringBuilder members = new java.lang.StringBuilder();
for (com.hazelcast.simulator.protocol.registry.AgentData agentData : componentRegistry... |
private boolean terminatePath(int depth) {
if (depth >= (maxDepth))
return true;
if (depth <= (minDepth))
return false;
rt.samplers.RandomSampler sampler = new rt.samplers.RandomSampler();
float p = sampler.makeSamples(1, 1)[0][0];
return p < (terminationProbability);
} | protected boolean terminatePath(int depth) {
if (depth >= (maxDepth))
return true;
if (depth <= (minDepth))
return false;
rt.samplers.RandomSampler sampler = new rt.samplers.RandomSampler();
float p = sampler.makeSamples(1, 1)[0][0];
return p < (terminationProbability);
} |
private void setOffset(float offset, int position) {
this.offset = offset;
offsetPixel = java.lang.Math.round(((stepDistance) * offset));
if ((currentStepPosition) > position) {
offsetPixel = (offsetPixel) - (stepDistance);
}
invalidate();
} | private void setOffset(float offset, int position) {
this.offset = offset;
offsetPixel = java.lang.Math.round(((stepDistance) * offset));
if ((currentStepPosition) > position) {
offsetPixel = (offsetPixel) - (stepDistance);
}else {
currentStepPosition = position;
}
invalidate();
... |
public java.lang.String eventMessage(boolean doOrUndo) {
java.lang.String messageToReturn;
if (doOrUndo) {
messageToReturn = ((((("Player " + (this.playerAffected)) + "'s roboticon on tile ") + (this.roboticonTileNo)) + " has malfunctioned and is now out of use for ") + (this.duration)) + " turns.";
... | public java.lang.String eventMessage(boolean doOrUndo) {
java.lang.String messageToReturn;
if (doOrUndo) {
messageToReturn = ((((("Player " + ((this.playerAffected) + 1)) + "'s roboticon on tile ") + (this.roboticonTileNo)) + " has malfunctioned and is now out of use for ") + (this.duration)) + " turns.... |
public java.lang.Object exec(java.util.List arguments) throws freemarker.template.TemplateModelException {
if ((arguments.size()) < 1) {
throw new freemarker.template.TemplateModelException("Invalid parameters to the message method. This method takes one or more parameters like this: message(key) or message... | public java.lang.Object exec(java.util.List arguments) throws freemarker.template.TemplateModelException {
if ((arguments.size()) < 1) {
throw new freemarker.template.TemplateModelException("Invalid parameters to the message method. This method takes one or more parameters like this: message(key) or message... |
private java.util.List<org.apache.oodt.cas.filemgr.structs.Product> getProductsFromCache(java.lang.String productTypeId) {
java.util.List<org.apache.oodt.cas.filemgr.structs.Product> products = null;
if ((org.apache.oodt.cas.filemgr.catalog.DataSourceCatalog.PRODUCT_CACHE.get(productTypeId)) == null) {
... | private java.util.List<org.apache.oodt.cas.filemgr.structs.Product> getProductsFromCache(java.lang.String productTypeId) {
java.util.List<org.apache.oodt.cas.filemgr.structs.Product> products;
if ((org.apache.oodt.cas.filemgr.catalog.DataSourceCatalog.PRODUCT_CACHE.get(productTypeId)) == null) {
return ... |
private static <T> T[] assertAllSameInstances(T... objects) {
for (int i = 0; i < ((objects.length) - 1); i++) {
org.junit.Assert.assertThat(objects[i], org.hamcrest.core.IsSame.sameInstance(objects[(i + 1)]));
}
return objects;
} | private static <T> T[] assertAllSameInstances(T... objects) {
for (int i = 0; i < ((objects.length) - 1); i++) {
assertThat(objects[i], org.hamcrest.core.IsSame.sameInstance(objects[(i + 1)]));
}
return objects;
} |
private data.structure.tree.NodeRBTree<E> myCloseRedNiece(boolean isLeft, data.structure.tree.NodeRBTree<E> sibling) {
data.structure.tree.NodeRBTree<E> niece = ((data.structure.tree.NodeRBTree<E>) ((isLeft) ? sibling.getLeftChild() : sibling.getRightChild()));
return niece.isRed() ? (niece.howManyChildren()) >... | private data.structure.tree.NodeRBTree<E> myCloseRedNiece(boolean isLeft, data.structure.tree.NodeRBTree<E> sibling) {
data.structure.tree.NodeRBTree<E> niece = ((data.structure.tree.NodeRBTree<E>) ((isLeft) ? sibling.getLeftChild() : sibling.getRightChild()));
return niece.isRed() ? niece : null;
} |
public void insert(int priority) {
for (int hole = ++(numQueueItems); (hole > 1) && (priority > (queue[(hole / 2)])); hole /= 2) {
queue[hole] = queue[(hole / 2)];
}
queue[hole] = priority;
} | public void insert(int priority) {
int hole = ++(numQueueItems);
for (; (hole > 1) && (priority > (queue[(hole / 2)])); hole /= 2) {
queue[hole] = queue[(hole / 2)];
}
queue[hole] = priority;
} |
public boolean accept(java.io.File dir, java.lang.String name) {
if ((name.lastIndexOf('.')) > 0) {
int lastIndex = name.lastIndexOf('.');
java.lang.String str = name.substring(lastIndex);
if (str.equals(".jpg")) {
return true;
}
}
return false;
} | public boolean accept(java.io.File dir, java.lang.String name) {
if ((name.lastIndexOf('.')) > 0) {
int lastIndex = name.lastIndexOf('.');
java.lang.String str = name.substring(lastIndex);
if (str.toLowerCase().equals(".jpg")) {
return true;
}
}
return false;
} |
public void robotInit() {
org.usfirst.frc.team2785.robot.Robot.oi = new org.usfirst.frc.team2785.robot.OI();
org.usfirst.frc.team2785.robot.Robot.drivebase = new org.usfirst.frc.team2785.robot.DriveBase();
org.usfirst.frc.team2785.robot.Robot.cameramount = new org.usfirst.frc.team2785.robot.CameraMount(Robo... | public void robotInit() {
org.usfirst.frc.team2785.robot.Robot.oi = new org.usfirst.frc.team2785.robot.OI();
org.usfirst.frc.team2785.robot.Robot.drivebase = new org.usfirst.frc.team2785.robot.DriveBase();
org.usfirst.frc.team2785.robot.Robot.cameramount = new org.usfirst.frc.team2785.robot.CameraMount(Robo... |
public java.util.List<java.lang.Float> getTotals(int index) {
java.util.List<java.lang.Float> totals = new java.util.ArrayList<>();
for (int i = 0; i < (desiredNutrients.size()); i++) {
totals.add(getTotal(nutrientColumns.get(i).values(), defaultUnits.get(i), index));
}
return totals;
} | public java.util.List<java.lang.Float> getTotals(int index) {
java.util.List<java.lang.Float> totals = new java.util.ArrayList<>();
for (int i = 0; i < (desiredNutrients.size()); i++) {
totals.add(getTotal(nutrientColumns.get(i), defaultUnits.get(i), index));
}
return totals;
} |
private static java.lang.String verifyLeagueComponents(org.sportim.service.beans.LeagueBean league, java.sql.Connection conn) throws java.sql.SQLException {
java.lang.String message = null;
int status = 200;
if ((status == 200) && ((league.getLeagueId()) > 0)) {
if (!(org.sportim.service.LeagueAPI.v... | private static java.lang.String verifyLeagueComponents(org.sportim.service.beans.LeagueBean league, java.sql.Connection conn) throws java.sql.SQLException {
java.lang.String message = null;
if ((league.getLeagueId()) > 0) {
if (!(org.sportim.service.LeagueAPI.verifyLeague(league.getLeagueId(), conn))) {... |
public void enqueue(E element) throws java.lang.RuntimeException {
linkedList.ListNode listNode = new linkedList.ListNode(element, null);
if ((size) == 0) {
head = listNode;
}else {
tail.setNext(listNode);
tail = listNode;
(size)++;
}
} | public void enqueue(E element) throws java.lang.RuntimeException {
linkedList.ListNode listNode = new linkedList.ListNode(element, null);
if ((size) == 0) {
head = listNode;
}else {
tail.setNext(listNode);
}
tail = listNode;
(size)++;
} |
public static void main(java.lang.String[] args) {
args = new java.lang.String[]{ "-parent" , "/Users/ft/Lavoro/tmp/sdatests-0.0.11/tests/1806151550-m3.large-800x2/mpl1/home/ubuntu" , "-size" , "m3.large" };
it.polimi.modaclouds.sdatests.validator.Main m = new it.polimi.modaclouds.sdatests.validator.Main();
... | public static void main(java.lang.String[] args) {
it.polimi.modaclouds.sdatests.validator.Main m = new it.polimi.modaclouds.sdatests.validator.Main();
com.beust.jcommander.JCommander jc = new com.beust.jcommander.JCommander(m, args);
java.lang.System.out.println(it.polimi.modaclouds.sdatests.validator.Main... |
public java.lang.String getHTTPHeader() {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
sb.append(n).append("=").append(v).append("; ");
if ((e) != null) {
sb.append("expires=").append(e);
}
if ((p) != null) {
sb.append("path=").append(e);
}
return sb.toString()... | public java.lang.String getHTTPHeader() {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
sb.append(n).append("=").append(v).append("; ");
if ((e) != null) {
sb.append("expires=").append(e);
}
if ((p) != null) {
sb.append("path=").append(p);
}
return sb.toString()... |
public int getEdgeOwner(client.models.mapdata.EdgeLocation edgeLocation) {
client.models.mapdata.EdgeLocation altLocation = this.getAltEdge(edgeLocation);
for (client.models.mapdata.Road r : this.roads) {
if ((r.getLocation().equals(edgeLocation)) || (r.getLocation().equals(altLocation)))
re... | public int getEdgeOwner(client.models.mapdata.EdgeLocation edgeLocation) {
client.models.mapdata.EdgeLocation altLocation = this.getAltEdge(edgeLocation);
if ((this.roads) != null)
for (client.models.mapdata.Road r : this.roads) {
if ((r.getLocation().equals(edgeLocation)) || (r.getLocation(... |
private org.talend.components.api.component.Connector getConnector() {
if ((myConnector) == null) {
java.util.Set<? extends org.talend.components.api.component.Connector> connectors = getParentNode().getComponentProperties().getAvailableConnectors(null, true);
for (org.talend.components.api.componen... | private org.talend.components.api.component.Connector getConnector() {
if ((myConnector) == null) {
java.util.Set<? extends org.talend.components.api.component.Connector> connectors = getParentNode().getComponentProperties().getAvailableConnectors(null, true);
if (connectors != null) {
f... |
public static java.lang.Iterable<java.lang.Object[]> parameters() {
java.util.LinkedList<java.lang.Object[]> parameters = new java.util.LinkedList<java.lang.Object[]>();
for (java.lang.Throwable throwable : com.hazelcast.client.protocol.compatibility.ErrorCodecCompatibilityTest.throwables) {
for (float ... | public static java.lang.Iterable<java.lang.Object[]> parameters() {
java.util.LinkedList<java.lang.Object[]> parameters = new java.util.LinkedList<java.lang.Object[]>();
for (java.lang.String version : com.hazelcast.client.protocol.compatibility.ErrorCodecCompatibilityTest.versions) {
for (java.lang.Thr... |
public com.cityelf.exceptions.Status confirmRegistration(long id, java.lang.String email) {
com.cityelf.model.User user = userRepository.findByEmail(email);
if ((user.getId()) == id) {
user.setActivated(true);
userRepository.save(user);
java.util.Set<com.cityelf.model.UserRole> userRoles... | public com.cityelf.exceptions.Status confirmRegistration(long id, java.lang.String email) {
com.cityelf.model.User user = userRepository.findByEmail(email);
if ((user.getId()) == id) {
java.util.Set<com.cityelf.model.UserRole> userRoles = roleService.getUserRoles(id);
userRoles.add(new com.citye... |
public final void start() {
if ((timer) == 0) {
startTime = java.lang.System.currentTimeMillis();
try {
java.lang.Thread.sleep(timer);
} catch (java.lang.Exception ex) {
}
onExecute(((java.lang.System.currentTimeMillis()) - (startTime)));
}else {
onExe... | public final void start() {
if ((timer) != 0) {
startTime = java.lang.System.currentTimeMillis();
try {
java.lang.Thread.sleep(timer);
} catch (java.lang.Exception ex) {
}
onExecute(((java.lang.System.currentTimeMillis()) - (startTime)));
}else {
onExe... |
public void appendFile(java.lang.String filepath, java.lang.String base64Content, com.facebook.react.bridge.Promise promise) {
try {
byte[] bytes = android.util.Base64.decode(base64Content, Base64.DEFAULT);
java.io.FileOutputStream outputStream = new java.io.FileOutputStream(filepath, true);
... | public void appendFile(java.lang.String filePath, java.lang.String base64Content, com.facebook.react.bridge.Promise promise) {
try {
byte[] bytes = android.util.Base64.decode(base64Content, Base64.DEFAULT);
java.io.FileOutputStream outputStream = new java.io.FileOutputStream(filePath, true);
... |
public void eventRaised(org.ovirt.engine.ui.uicompat.Event<? extends org.ovirt.engine.ui.uicompat.EventArgs> ev, java.lang.Object sender, org.ovirt.engine.ui.uicompat.EventArgs args) {
org.ovirt.engine.ui.uicommonweb.models.ListModel<org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData<E>> entities = ((org.o... | public void eventRaised(org.ovirt.engine.ui.uicompat.Event<? extends org.ovirt.engine.ui.uicompat.EventArgs> ev, java.lang.Object sender, org.ovirt.engine.ui.uicompat.EventArgs args) {
org.ovirt.engine.ui.uicommonweb.models.ListModel<org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData<E>> entities = ((org.o... |
protected void onActivityResult(final int requestCode, final int resultCode, final android.content.Intent intent) {
android.net.Uri uri = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if ((resultCode == (android.app.Activity.RESULT_OK)) && (requestCode == 5)) {
ringVib.getRing().... | protected void onActivityResult(final int requestCode, final int resultCode, final android.content.Intent intent) {
android.net.Uri uri = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (((resultCode == (android.app.Activity.RESULT_OK)) && (requestCode == 5)) && (uri != null)) {
... |
public void addNewPendingAndDecode(java.util.HashMap<java.lang.String, java.lang.String> pendingToDecode) {
for (java.lang.String pending : pendingToDecode.keySet()) {
this.mPending.put(android.util.Base64.decode(pending.getBytes(), Base64.NO_WRAP).toString(), pendingToDecode.get(pending));
}
} | public void addNewPendingAndDecode(java.util.HashMap<java.lang.String, java.lang.String> pendingToDecode) {
for (java.lang.String pending : pendingToDecode.keySet()) {
this.mPending.put(new java.lang.String(android.util.Base64.decode(pending.getBytes(), Base64.NO_WRAP)), pendingToDecode.get(pending));
}... |
public int doEndTag() throws javax.servlet.jsp.JspException {
java.lang.String content = generateContent();
if ((variableName) != null) {
pageContext.setAttribute(variableName, content);
}else {
try {
pageContext.getOut().write(content);
} catch (java.io.IOException e) {
... | public int doEndTag() throws javax.servlet.jsp.JspException {
java.lang.String content = generateContent(((variableName) != null));
if ((variableName) != null) {
pageContext.setAttribute(variableName, content);
}else {
try {
pageContext.getOut().write(content);
} catch (j... |
private static java.lang.String treeAsStemmedCollocation(edu.stanford.nlp.trees.Tree t, boolean threadSafe) {
java.util.List<edu.stanford.nlp.ling.WordTag> list = edu.stanford.nlp.trees.CollocationFinder.getStemmedWordTagsFromTree(t, threadSafe);
java.lang.StringBuffer s = new java.lang.StringBuffer(160);
e... | private static java.lang.String treeAsStemmedCollocation(edu.stanford.nlp.trees.Tree t) {
java.util.List<edu.stanford.nlp.ling.WordTag> list = edu.stanford.nlp.trees.CollocationFinder.getStemmedWordTagsFromTree(t);
java.lang.StringBuilder s = new java.lang.StringBuilder(160);
edu.stanford.nlp.ling.WordTag f... |
private boolean isThisIgnored(java.lang.String sender) {
return ((this.plugin.cUseMapAsWhitelist(this.botId)) && (!(this.plugin.cNicknameIsInIrcMap(this.botId, sender)))) || (this.ignores.contains(sender));
} | private boolean isThisIgnored(java.lang.String sender) {
return ((this.plugin.cUseMapAsWhitelist(this.botId)) && (!(this.plugin.cNicknameIsInIrcMap(this.botId, sender.toLowerCase())))) || (this.ignores.contains(sender));
} |
public static play.mvc.Result runProject(java.lang.String projectId) throws java.lang.Exception {
models.test.TestProjectModel project = controllers.test.TestProjectHelper.getProjectById(projectId);
org.ats.jmeter.models.JMeterScript snapshot = controllers.test.JMeterScriptHelper.getLastestCommit(project.getId(... | public static play.mvc.Result runProject(java.lang.String projectId) throws java.lang.Exception {
models.test.TestProjectModel project = controllers.test.TestProjectHelper.getProjectById(projectId);
if (project == null) {
return redirect(routes.PerformanceController.index());
}
org.ats.jmeter.mo... |
private static java.io.File extractFile(org.eclipse.ui.IEditorPart editor) {
org.eclipse.ui.IEditorInput editorInput = editor.getEditorInput();
if (editorInput != null) {
org.eclipse.ui.part.FileEditorInput fileEditorInput = editorInput.getAdapter(org.eclipse.ui.part.FileEditorInput.class);
if (... | private static java.lang.Object extractFile(org.eclipse.ui.IEditorPart editor) {
org.eclipse.ui.IEditorInput editorInput = editor.getEditorInput();
if (editorInput != null) {
org.eclipse.ui.part.FileEditorInput fileEditorInput = editorInput.getAdapter(org.eclipse.ui.part.FileEditorInput.class);
... |
public void run() {
android.graphics.Bitmap bitmap = android.graphics.Bitmap.createBitmap(containerView.getWidth(), containerView.getHeight(), Bitmap.Config.ARGB_8888);
android.graphics.Canvas canvas = new android.graphics.Canvas(bitmap);
containerView.draw(canvas);
this.bitmap = bitmap;
} | public void run() {
if ((containerView) != null) {
android.graphics.Bitmap bitmap = android.graphics.Bitmap.createBitmap(containerView.getWidth(), containerView.getHeight(), Bitmap.Config.ARGB_8888);
android.graphics.Canvas canvas = new android.graphics.Canvas(bitmap);
containerView.draw(can... |
public static java.util.ArrayList<com.tuccro.cars.core.Brand> getBrandsFromDBCursor(android.database.Cursor cursor) {
java.util.ArrayList<com.tuccro.cars.core.Brand> brands = new java.util.ArrayList<>();
int id;
java.lang.String name;
cursor.moveToFirst();
while (cursor.moveToNext()) {
id = ... | public static java.util.ArrayList<com.tuccro.cars.core.Brand> getBrandsFromDBCursor(android.database.Cursor cursor) {
java.util.ArrayList<com.tuccro.cars.core.Brand> brands = new java.util.ArrayList<>();
int id;
java.lang.String name;
cursor.moveToFirst();
do {
id = cursor.getInt(cursor.getC... |
public void saveData(java.lang.String savepath) {
try {
java.io.FileWriter fw = new java.io.FileWriter(savepath);
java.io.BufferedWriter bw = new java.io.BufferedWriter(fw);
writeData(bw);
fw.close();
bw.close();
} catch (java.lang.Exception e) {
return ;
}
} | public int saveData(java.lang.String savepath) {
try {
java.io.FileWriter fw = new java.io.FileWriter(savepath);
java.io.BufferedWriter bw = new java.io.BufferedWriter(fw);
writeData(bw);
fw.close();
bw.close();
return 0;
} catch (java.lang.Exception e) {
... |
public void onRequestFinish(java.lang.Object response) {
dismissDialog();
model = ((com.youxing.sogoteacher.model.CourseGoingModel) (response));
if ((model.getData().getCourse()) == null) {
showEmptyView("课程还没有开始哦~");
}else {
adapter.notifyDataSetChanged();
}
} | public void onRequestFinish(java.lang.Object response) {
dismissDialog();
model = ((com.youxing.sogoteacher.model.CourseGoingModel) (response));
if ((model.getData().getCourse()) == null) {
isEmpty = true;
}
adapter.notifyDataSetChanged();
} |
public void init() {
org.jasig.cas.client.authentication.AttributePrincipal principal = ((org.jasig.cas.client.authentication.AttributePrincipal) (com.hsuforum.common.web.jsf.utils.JSFUtils.getHttpServletRequest().getUserPrincipal()));
java.util.Map attributes = principal.getAttributes();
java.lang.String u... | public void init() {
org.jasig.cas.client.authentication.AttributePrincipal principal = ((org.jasig.cas.client.authentication.AttributePrincipal) (com.hsuforum.common.web.jsf.utils.JSFUtils.getHttpServletRequest().getUserPrincipal()));
java.util.Map attributes = principal.getAttributes();
java.lang.String u... |
private static boolean allNodesVisited(int[] visitedNodes) {
boolean allVisited = true;
for (int i = 0; i < (visitedNodes.length); i++) {
if ((visitedNodes[i]) == 0) {
allVisited = false;
break;
}
}
return allVisited;
} | private static boolean allNodesVisited(boolean[] visitedNodes) {
boolean allVisited = true;
for (int i = 0; i < (visitedNodes.length); i++) {
if (!(visitedNodes[i])) {
allVisited = false;
break;
}
}
return allVisited;
} |
public void append(java.lang.String str) {
android.util.Log.d("strbuff", "append");
if ((mUpdatedBuilder.length()) < (com.example.android.camera2video.MyStringBuffer.mCharCount)) {
mUpdatedBuilder.append(str);
}else {
mBuilderToFile = mUpdatedBuilder;
mUpdatedBuilder = new java.lang.... | public void append(java.lang.String str) {
if ((mUpdatedBuilder.length()) < (com.example.android.camera2video.MyStringBuffer.mCharCount)) {
mUpdatedBuilder.append(str);
}else {
mBuilderToFile = mUpdatedBuilder;
mUpdatedBuilder = new java.lang.StringBuffer(com.example.android.camera2video... |
public void RememberingRainData() throws com.itextpdf.text.DocumentException, java.io.IOException {
Project.DataTester.RememberingRain = Project.DataToArray.textToArray("RememberingRain.txt");
emptyResult = (Project.DataTester.RememberingRain.isEmpty()) ? false : true;
barResult = ((Project.DataTester.Remem... | public void RememberingRainData() throws com.itextpdf.text.DocumentException, java.io.IOException {
java.io.File[] file = new java.io.File[]{ new java.io.File("RememberingRain.txt") };
Project.DataTester.RememberingRain = Project.DataToArray.textToArray(file);
emptyResult = (Project.DataTester.RememberingRa... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
mRoot = ((android.widget.FrameLayout) (inflater.inflate(R.layout.fragment_study_container, container, false)));
getChildFragmentManager().beginTransaction().add(R... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
mRoot = ((android.widget.FrameLayout) (inflater.inflate(R.layout.fragment_study_container, container, false)));
getChildFragmentManager().beginTransaction().add(R... |
public void testQueryProgressHidden() throws java.lang.Throwable {
final java.lang.String SCRIPT_TEXT = (("set hive.support.concurrency = false;\n" + ("!set silent true\n" + "select count(*) from ")) + (org.apache.hive.beeline.TestBeeLineWithArgs.tableName)) + ";\n";
final java.lang.String EXPECTED_PATTERN = "E... | public void testQueryProgressHidden() throws java.lang.Throwable {
final java.lang.String SCRIPT_TEXT = (("set hive.support.concurrency = false;\n" + ("!set silent true\n" + "select count(*) from ")) + (org.apache.hive.beeline.TestBeeLineWithArgs.tableName)) + ";\n";
final java.lang.String EXPECTED_PATTERN = "E... |
public java.util.ArrayList<java.lang.String> getLines(java.lang.String resource) {
java.io.InputStreamReader isr = new java.io.InputStreamReader(this.getClass().getResourceAsStream(resource));
java.util.Scanner s = new java.util.Scanner(isr);
java.util.ArrayList<java.lang.String> lines = new java.util.Array... | public java.util.ArrayList<java.lang.String> getLines(java.lang.String resource) {
java.io.InputStreamReader isr = new java.io.InputStreamReader(getClass().getResourceAsStream(resource));
java.util.Scanner s = new java.util.Scanner(isr);
java.util.ArrayList<java.lang.String> lines = new java.util.ArrayList<... |
private boolean isNodeIdAvailable(java.util.List<java.lang.Short> nodeIdList, short nodeIdTobeChecked) {
boolean nodeIdAvailable = false;
for (java.lang.Short nodeId : nodeIdList) {
if ((nodeId.shortValue()) == nodeIdTobeChecked) {
nodeIdAvailable = true;
}
}
return nodeIdAva... | private static boolean isNodeIdAvailable(java.util.List<java.lang.Short> nodeIdList, short nodeIdTobeChecked) {
boolean nodeIdAvailable = false;
for (java.lang.Short nodeId : nodeIdList) {
if ((nodeId.shortValue()) == nodeIdTobeChecked) {
nodeIdAvailable = true;
}
}
return no... |
private void validateUser(java.lang.String username, java.lang.String password) {
java.util.ArrayList<java.lang.String> userDetails = new java.util.ArrayList<java.lang.String>();
userDetails.add(username);
userDetails.add(password);
client.control.Request request = new client.control.Request(common.enum... | public void validateUser(java.lang.String username, java.lang.String password) {
java.util.ArrayList<java.lang.String> userDetails = new java.util.ArrayList<java.lang.String>();
userDetails.add(username);
userDetails.add(password);
client.control.Request request = new client.control.Request(common.enums... |
private int checkForWinner() {
int[] loser = new int[]{ 0 , 0 };
if (java.util.Arrays.equals(playerFingers[0], loser)) {
return 0;
}else
if (java.util.Arrays.equals(playerFingers[1], loser)) {
return 1;
}
return -1;
} | private int checkForWinner() {
int[] loser = new int[]{ 0 , 0 };
if (java.util.Arrays.equals(playerFingers[0], loser)) {
return 1;
}else
if (java.util.Arrays.equals(playerFingers[1], loser)) {
return 0;
}
return -1;
} |
public static boolean fileExistsInWowzaContentPath(com.wowza.wms.application.IApplicationInstance appInstance, java.lang.String mediaFilePrefix, java.lang.String mediaFilename) {
if ((com.wowza.util.StringUtils.isEmpty(mediaFilename)) || (com.wowza.util.StringUtils.isEmpty(mediaFilePrefix)))
return false;
... | public static boolean fileExistsInWowzaContentPath(com.wowza.wms.application.IApplicationInstance appInstance, java.lang.String mediaFilePrefix, java.lang.String mediaFilename) {
if ((com.wowza.util.StringUtils.isEmpty(mediaFilename)) && (com.wowza.util.StringUtils.isEmpty(mediaFilePrefix)))
return false;
... |
public void discardCycle() {
for (int i = 0; i < (playersIn.size()); i++) {
playersIn.get(i).discard();
if (playersIn.get(i).isHuman()) {
java.lang.System.out.println(playersIn.get(i).hand.toString());
}
}
} | private void discardCycle() {
for (int i = 0; i < (playersIn.size()); i++) {
playersIn.get(i).discard();
if (playersIn.get(i).isHuman()) {
java.lang.System.out.println(playersIn.get(i).hand.toString());
}
}
} |
private com.github.kevinsawicki.http.HttpRequest prepareApiDeleteRequest(java.lang.String apiPath, java.util.Map<java.lang.String, ?> params) throws com.github.kevinsawicki.http.HttpRequest.HttpRequestException {
com.github.kevinsawicki.http.HttpRequest req = com.github.kevinsawicki.http.HttpRequest.delete(((accoun... | private com.github.kevinsawicki.http.HttpRequest prepareApiDeleteRequest(java.lang.String apiPath, java.util.Map<java.lang.String, ?> params) throws com.github.kevinsawicki.http.HttpRequest.HttpRequestException {
com.github.kevinsawicki.http.HttpRequest req = com.github.kevinsawicki.http.HttpRequest.delete(((accoun... |
private void cleanup() {
if ((mTaskHandle) != null) {
mTaskHandle.cancel(true);
mTaskHandle = null;
}
mBuffer.clear();
mBuffer = null;
mFrequencyChangeListener = null;
mListener = null;
mMixer = null;
mDecimationFilter.dispose();
mDecimationFilter = null;
} | private void cleanup() {
if ((mTaskHandle) != null) {
mTaskHandle.cancel(true);
mTaskHandle = null;
}
synchronized(mBuffer) {
mBuffer.clear();
mBuffer = null;
}
mFrequencyChangeListener = null;
mListener = null;
mMixer = null;
mDecimationFilter.dispose();
... |
public final void setFlashlightMode(@android.support.annotation.Nullable
final de.jeisfeld.augendiagnoselib.activities.CameraActivity.FlashMode flashlightMode) {
if (flashlightMode == null) {
mCurrentAutoExposureMode = android.hardware.camera2.CaptureRequest.CONTROL_AE_MODE_OFF;
}else {
switch (... | public final void setFlashlightMode(@android.support.annotation.Nullable
final de.jeisfeld.augendiagnoselib.activities.CameraActivity.FlashMode flashlightMode) {
if (flashlightMode == null) {
mCurrentAutoExposureMode = android.hardware.camera2.CaptureRequest.CONTROL_AE_MODE_OFF;
}else {
switch (... |
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.bluetooth.BluetoothDevice device = mBleDeviceListAdapter.getDevice(position);
final android.content.Intent intent = new android.content.Intent(this, com.xinzhongxin.bletester.DeviceConnect.clas... | public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.bluetooth.BluetoothDevice device = mBleDeviceListAdapter.getDevice(position);
final android.content.Intent intent = new android.content.Intent(this, com.xinzhongxin.bletester.DeviceConnect.clas... |
private java.util.List<java.lang.String> sqliteLauseet() {
java.util.ArrayList<java.lang.String> lista = new java.util.ArrayList<>();
lista.add("PRAGMA foreign_keys = ON;");
lista.add("CREATE TABLE categories (categoryId integer PRIMARY KEY, title varchar(255));");
lista.add("CREATE TABLE subCategories ... | private java.util.List<java.lang.String> sqliteLauseet() {
java.util.ArrayList<java.lang.String> lista = new java.util.ArrayList<>();
lista.add("PRAGMA foreign_keys = ON;");
lista.add("CREATE TABLE categories (categoryId integer PRIMARY KEY, title varchar(255));");
lista.add("CREATE TABLE subCategories ... |
public com.vzome.core.algebra.AlgebraicNumber plus(com.vzome.core.algebra.AlgebraicNumber that) {
if (that.isZero())
return this;
int order = this.factors.length;
com.vzome.core.algebra.BigRational[] sum = new com.vzome.core.algebra.BigRational[order];
for (int i = 0; i < order; i++) {
... | public com.vzome.core.algebra.AlgebraicNumber plus(com.vzome.core.algebra.AlgebraicNumber that) {
if (this.isZero())
return that;
if (that.isZero())
return this;
int order = this.factors.length;
com.vzome.core.algebra.BigRational[] sum = new com.vzome.core.algebra.BigRational[o... |
public void onClick(android.view.View v) {
finalCountdown.cancel();
userScores();
android.content.Intent myIntent = new android.content.Intent(this, com.example.android.sailingquiz.MainActivity.class);
myIntent.putExtra("score", score);
this.startActivity(myIntent);
finish();
} | public void onClick(android.view.View v) {
finalCountdown.cancel();
userScores();
android.content.Intent myIntent = new android.content.Intent(this, com.example.android.sailingquiz.MainActivity.class);
myIntent.putExtra("score", score);
this.startActivity(myIntent);
result();
finish();
} |
public void update(org.modelio.metamodel.uml.infrastructure.ModelElement element, org.modelio.api.module.propertiesPage.IModulePropertyTable table) {
java.lang.String property = edu.casetools.rcase.utils.PropertiesUtils.getInstance().getTaggedValue(RCaseProperties.PROPERTY_REQUIREMENT_ID, element);
table.addPro... | public void update(org.modelio.metamodel.uml.infrastructure.ModelElement element, org.modelio.api.module.propertiesPage.IModulePropertyTable table) {
java.lang.String property = edu.casetools.rcase.utils.PropertiesUtils.getInstance().getTaggedValue(RCaseProperties.PROPERTY_REQUIREMENT_ID, element);
table.addPro... |
protected com.example.haticesigirci.payment.FilterResults performFiltering(java.lang.CharSequence constraint) {
com.example.haticesigirci.payment.FilterResults results = new com.example.haticesigirci.payment.FilterResults();
if (constraint != null) {
resultList = getAutoComplete(constraint.toString());
... | protected com.example.haticesigirci.payment.FilterResults performFiltering(java.lang.CharSequence constraint) {
com.example.haticesigirci.payment.FilterResults results = new com.example.haticesigirci.payment.FilterResults();
if (constraint != null) {
resultList = getAutoComplete(constraint);
and... |
public void handleCityOfRelocationChange(java.lang.String newCity) {
java.lang.String city = data.getRelocationCity();
if (newCity.equals(city)) {
data.setRelocationCity(city);
return ;
}
if (newCity.isEmpty()) {
data.setRelocationCity(null);
hasChanges = true;
}
} | public void handleCityOfRelocationChange(java.lang.String newCity) {
java.lang.String city = data.getRelocationCity();
if (newCity.equals(city)) {
data.setRelocationCity(city);
}else {
data.setRelocationCity(newCity);
hasChanges = true;
}
if (newCity.isEmpty()) {
data... |
public void startAutoRefresh() {
javafx.animation.Timeline autoRefresh = new javafx.animation.Timeline(new javafx.animation.KeyFrame(javafx.util.Duration.seconds(30), new javafx.event.EventHandler<javafx.event.ActionEvent>() {
@java.lang.Override
public void handle(javafx.event.ActionEvent event) {
... | public void startAutoRefresh() {
autoRefresh = new javafx.animation.Timeline(new javafx.animation.KeyFrame(javafx.util.Duration.seconds(30), new javafx.event.EventHandler<javafx.event.ActionEvent>() {
@java.lang.Override
public void handle(javafx.event.ActionEvent event) {
if (autoRefres... |
public static void main(java.lang.String[] args) {
java.util.Scanner scan = new java.util.Scanner(java.lang.System.in);
while (scan.hasNext()) {
java.lang.String str = scan.next();
tree.SuffixTree st = new tree.SuffixTree(str);
st.build(false);
st.print();
}
} | public static void main(java.lang.String[] args) {
java.util.Scanner scan = new java.util.Scanner(java.lang.System.in);
while (scan.hasNext()) {
java.lang.String str = scan.next();
tree.SuffixTree st = new tree.SuffixTree(str);
st.build(true);
st.print();
}
} |
protected void onPostExecute(android.graphics.Bitmap imageToSave) {
imageView.setImageBitmap(imageToSave);
java.io.File file = new java.io.File(imageDir, imageName);
try {
java.io.FileOutputStream out = new java.io.FileOutputStream(file);
imageToSave.compress(Bitmap.CompressFormat.JPEG, 100,... | protected void onPostExecute(android.graphics.Bitmap imageToSave) {
java.io.File file = new java.io.File(imageDir, imageName);
try {
if (imageToSave != null) {
imageView.setImageBitmap(imageToSave);
java.io.FileOutputStream out = new java.io.FileOutputStream(file);
im... |
public void button_clear(android.view.View view) {
chkEventType.setChecked(false);
chkLocation.setChecked(false);
chkName.setChecked(false);
chkSubType.setChecked(false);
spnEventTypeSpinner.setSelection(0);
spnEventSubtypeSpinner.setEnabled(false);
spnEventSubtypeSpinner.setClickable(false)... | public void button_clear(android.view.View view) {
chkEventType.setChecked(false);
chkName.setChecked(false);
chkSubType.setChecked(false);
spnEventTypeSpinner.setSelection(0);
spnEventSubtypeSpinner.setEnabled(false);
spnEventSubtypeSpinner.setClickable(false);
txtName.setText("");
} |
private org.ihtsdo.rvf.execution.service.impl.ExecutionConfig createExecutionConfig(org.ihtsdo.rvf.execution.service.impl.ValidationRunConfig validationConfig) {
final org.ihtsdo.rvf.execution.service.impl.ExecutionConfig executionConfig = new org.ihtsdo.rvf.execution.service.impl.ExecutionConfig(validationConfig.g... | public org.ihtsdo.rvf.execution.service.impl.ExecutionConfig createExecutionConfig(org.ihtsdo.rvf.execution.service.impl.ValidationRunConfig validationConfig) {
org.ihtsdo.rvf.execution.service.impl.ExecutionConfig executionConfig = new org.ihtsdo.rvf.execution.service.impl.ExecutionConfig(validationConfig.getRunId... |
public void init() {
verbose = false;
inverse = false;
vcfInputFile = "-";
filterId = ca.mcgill.mcb.pcingola.snpSift.SnpSift.class.getSimpleName();
sets = new java.util.ArrayList<java.util.HashSet<java.lang.String>>();
formatVersion = null;
exceptionIfNotFound = false;
gtFieldName = "GT"... | public void init() {
verbose = false;
inverse = false;
vcfInputFile = null;
filterId = ca.mcgill.mcb.pcingola.snpSift.SnpSift.class.getSimpleName();
sets = new java.util.ArrayList<java.util.HashSet<java.lang.String>>();
formatVersion = null;
exceptionIfNotFound = false;
gtFieldName = "GT... |
private void checkCapacity(int neededBytes) {
int capacity = buffer.capacity();
int position = buffer.position();
if ((capacity - position) < neededBytes) {
buffer = java.nio.ByteBuffer.allocate(java.lang.Math.max((capacity * 2), (capacity + neededBytes))).put(buffer.array());
}
} | private void checkCapacity(int neededBytes) {
int capacity = buffer.capacity();
int position = buffer.position();
if ((capacity - position) < neededBytes) {
buffer = java.nio.ByteBuffer.allocate(java.lang.Math.max((capacity * 2), (capacity + neededBytes))).put(buffer.array(), 0, position);
}
} |
public void run() {
try {
java.lang.Thread.sleep(500);
serialPort.close();
serialPort = null;
mOutputStream.close();
hdx.HdxUtil.SetPrinterPower(0);
callbackContext.success();
} catch (java.io.IOException ex) {
ex.printStackTrace();
callbackContext... | public void run() {
try {
java.lang.Thread.sleep(500);
serialPort.close();
serialPort = null;
mOutputStream.close();
hdx.HdxUtil.SetPrinterPower(0);
callbackContext.success();
} catch (java.io.IOException ex) {
ex.printStackTrace();
callbackContext... |
public void createPage(java.lang.String titleText, java.lang.String urlText, long time) {
com.example.jose.updated.model.Page newPage = new com.example.jose.updated.model.Page(titleText, urlText, time);
try {
newPage.setContents(refresher.downloadHtml(newPage));
newPage.setTimeOfLastUpdateInMill... | public void createPage(java.lang.String titleText, java.lang.String urlText, long time) {
com.example.jose.updated.model.Page newPage = new com.example.jose.updated.model.Page(titleText, urlText, time);
try {
newPage.setContents(refresher.downloadHtml(newPage));
newPage.setTimeOfLastUpdateInMill... |
public java.awt.Color getPixel(int column, int row, java.awt.Color emptyColor) {
int i = getArrayIndex(column, row);
java.awt.Color clr = ((this.imageData[i]) == null) ? emptyColor : this.imageData[i];
return i >= 0 ? clr : null;
} | public java.awt.Color getPixel(int column, int row, java.awt.Color emptyColor) {
int i = getArrayIndex(column, row);
if (i < 0) {
return null;
}
return (this.imageData[i]) == null ? emptyColor : this.imageData[i];
} |
private void setClassListMap(listener.ITestContext tc) {
for (listener.ITestNGMethod m : tc.getAllTestMethods()) {
java.lang.Class methodsClass = m.getRealClass();
java.util.List<listener.ITestNGMethod> methods = listener.WebDriverListener.classListMap.get(methodsClass);
if (methods == null)... | private void setClassListMap(listener.ITestContext tc) {
synchronized(listener.WebDriverListener.classListMap) {
for (listener.ITestNGMethod m : tc.getAllTestMethods()) {
java.lang.Class methodsClass = m.getRealClass();
java.util.List<listener.ITestNGMethod> methods = listener.WebDri... |
public void onReset() {
if ((((mTargetView) != null) && ((mTargetView) instanceof com.aspsine.swipetoloadlayout.SwipeTrigger)) && (com.aspsine.swipetoloadlayout.SwipeToLoadLayout.STATUS.isStatusDefault(mStatus))) {
((com.aspsine.swipetoloadlayout.SwipeTrigger) (mTargetView)).complete();
}
} | public void onReset() {
if ((((mTargetView) != null) && ((mTargetView) instanceof com.aspsine.swipetoloadlayout.SwipeTrigger)) && (com.aspsine.swipetoloadlayout.SwipeToLoadLayout.STATUS.isStatusDefault(mStatus))) {
((com.aspsine.swipetoloadlayout.SwipeTrigger) (mTargetView)).onReset();
}
} |
private static void launchMarketService(utils.proxy.AuthenticatePolicy.Client clientId) {
final data.dao.market.MarketDaoProxy marketDao = data.dao.market.MarketDaoProxy.getInstance();
final service.query.OrderQueryService order = service.impl.query.OrderQueryManager.getInstance();
final service.member.Memb... | private static void launchMarketService(utils.proxy.AuthenticatePolicy.Client clientId) {
final data.dao.market.MarketDaoProxy marketDao = data.dao.market.MarketDaoProxy.getInstance();
final service.query.OrderQueryService order = service.impl.query.OrderQueryManager.getInstance();
final service.member.Memb... |
public static void main(java.lang.String[] args) {
lingua.ui.gtk.main_window.MainWindow w = null;
org.gnome.gtk.Gtk.init(args);
org.freedesktop.bindings.Internationalization.init("lingua", "/usr/share/locale");
try {
w = lingua.ui.gtk.main_window.MainWindow.getInstance();
} catch (org.gnome.... | public static void main(java.lang.String[] args) {
lingua.ui.gtk.main_window.MainWindow w = null;
try {
org.gnome.gtk.Gtk.init(args);
} catch (org.gnome.glib.FatalError err) {
}
org.freedesktop.bindings.Internationalization.init("lingua", "/usr/share/locale");
try {
w = lingua.ui... |
public com.cybor.gamehorse.core.Horse copy() {
com.cybor.gamehorse.core.Horse horse = new com.cybor.gamehorse.core.Horse();
horse.setX(x);
horse.setY(y);
horse.setState(state);
horse.setOnPositionChangeListener(onPositionChangeListener);
setOnPositionChangeListener(null);
return horse;
} | public com.cybor.gamehorse.core.Horse copy() {
com.cybor.gamehorse.core.Horse horse = new com.cybor.gamehorse.core.Horse();
horse.setX(x);
horse.setY(y);
horse.setState(state);
horse.setOnPositionChangeListener(onPositionChangeListener);
setOnPositionChangeListener(onPositionChangeListener);
... |
protected void onResume() {
super.onResume();
if ((getIntent()) != null) {
int position = getIntent().getIntExtra(Constant.ARG_SELECTED_POSITION, (-1));
if (position > (-1)) {
mSelectedTabPosition = position;
}
}
setContentMain(mShowType, mSelectedArea);
onTabSele... | protected void onResume() {
super.onResume();
if ((getIntent()) != null) {
int position = getIntent().getIntExtra(Constant.ARG_SELECTED_POSITION, (-1));
if (position > (-1)) {
mSelectedTabPosition = position;
setContentMain(mShowType, mSelectedArea);
onTabSele... |
public void testBasicQuery() throws java.lang.Exception {
org.sagebionetworks.repo.model.entity.query.EntityQuery query = new org.sagebionetworks.repo.model.entity.query.EntityQuery();
query.setLimit(1L);
org.sagebionetworks.repo.model.entity.query.EntityQueryResults results = entityQueryManger.executeQuery... | public void testBasicQuery() throws java.lang.Exception {
org.sagebionetworks.repo.model.entity.query.EntityQuery query = new org.sagebionetworks.repo.model.entity.query.EntityQuery();
query.setLimit(1L);
org.sagebionetworks.repo.model.entity.query.EntityQueryResults results = entityQueryManger.executeQuery... |
private java.lang.String isValueNameExist(java.util.List<com.stratelia.silverpeas.pdc.control.Value> values, java.util.List<com.stratelia.silverpeas.pdc.control.Value> valuesToCheck) {
java.util.Iterator<com.stratelia.silverpeas.pdc.control.Value> it = valuesToCheck.iterator();
com.stratelia.silverpeas.pdc.cont... | private java.lang.String isValueNameExist(java.util.List<com.stratelia.silverpeas.pdc.control.Value> values, java.util.List<com.stratelia.silverpeas.pdc.control.Value> valuesToCheck) {
java.util.Iterator<com.stratelia.silverpeas.pdc.control.Value> it = valuesToCheck.iterator();
com.stratelia.silverpeas.pdc.cont... |
public void xtea2() {
org.mapdb.DB db = maker().make();
db.hashMap("aa").put("aa", "bb");
db.commit();
assertEquals(0L, getBitField());
db.close();
try {
maker().encryptionEnable("password").make();
fail();
} catch (org.mapdb.DBException e) {
assertEquals("Password is... | public void xtea2() {
org.mapdb.DB db = maker().make();
db.hashMap("aa").put("aa", "bb");
db.commit();
assertEquals(0L, getBitField(db));
db.close();
try {
maker().encryptionEnable("password").make();
fail();
} catch (org.mapdb.DBException e) {
assertEquals("Password ... |
private static imu.recommender.models.route.RouteModel CarTrip(imu.recommender.Recommender route) {
imu.recommender.models.route.RouteModel cartrip = null;
for (int i = 0; i < (route.getRoutes().size()); i++) {
if (route.getRoutes().get(i).getRoute().getAdditionalInfo().get("mode").equals("car")) {
... | public static imu.recommender.models.route.RouteModel CarTrip(imu.recommender.Recommender route) {
imu.recommender.models.route.RouteModel cartrip = null;
for (int i = 0; i < (route.getRoutes().size()); i++) {
if (route.getRoutes().get(i).getRoute().getAdditionalInfo().get("mode").equals("car")) {
... |
public void chanceBlock(int x, int z, org.bukkit.block.Block block) {
if (((block.getBiome()) == (org.bukkit.block.Biome.MUSHROOM_ISLAND)) || ((block.getBiome()) == (org.bukkit.block.Biome.MUSHROOM_SHORE))) {
if ((block.getType()) == (org.bukkit.Material.GRASS)) {
block.setType(Material.MYCEL);
... | public void chanceBlock(int x, int z, org.bukkit.block.Block block) {
if ((block.getBiome()) == (org.bukkit.block.Biome.MUSHROOM_ISLAND)) {
if ((block.getType()) == (org.bukkit.Material.GRASS)) {
block.setType(Material.MYCEL);
}
}
} |
public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == (magazoo.magazine.langa.tine.MainActi... | public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == (magazoo.magazine.langa.tine.MainActi... |
private java.lang.String generateId() {
int max = 999999;
int min = 100000;
java.lang.String id = java.lang.Integer.toString(((int) (java.lang.Math.round((((java.lang.Math.random()) * ((max - min) + 1)) + min)))));
return (this.commandIds.get(id)) != null ? generateId() : id;
} | private java.lang.String generateId() {
int max = 999999;
int min = 100000;
java.lang.String id = java.lang.Integer.toString(((int) (java.lang.Math.round((((java.lang.Math.random()) * ((max - min) + 1)) + min)))));
synchronized(this.commandIds) {
id = ((this.commandIds.get(id)) != null) ? genera... |
public void onStart() {
super.onStart();
android.content.Intent i = getIntent();
int position = i.getIntExtra("position", 0);
com.example.futin.importimages.UserInterface.SingleImageAdapter adapter = new com.example.futin.importimages.UserInterface.SingleImageAdapter(getApplicationContext(), this);
... | public void onStart() {
super.onStart();
android.content.Intent i = getIntent();
int position = i.getIntExtra("position", 0);
com.example.futin.importimages.UserInterface.SingleImageAdapter adapter = new com.example.futin.importimages.UserInterface.SingleImageAdapter(this);
viewPager.setAdapter(adap... |
public java.util.List<com.dp.chart.Xaxis> createXaxis() {
java.util.List<com.dp.chart.Xaxis> xaxisList = new java.util.ArrayList<>();
com.dp.chart.Xaxis xaxis = new com.dp.chart.Xaxis();
com.dp.chart.factory.Strin[] data = new com.dp.chart.factory.Strin[]{ "Jan" , "Fev" , "March" , "April" , "May" , "Jun" ,... | public java.util.List<com.dp.chart.Xaxis> createXaxis() {
java.util.List<com.dp.chart.Xaxis> xaxisList = new java.util.ArrayList<>();
com.dp.chart.Xaxis xaxis = new com.dp.chart.Xaxis();
java.lang.String[] data = new java.lang.String[]{ "Jan" , "Fev" , "March" , "April" , "May" , "Jun" , "Jul" , "Aug" , "Se... |
public void onContentAdd() {
int topicId = mTopic.getId();
android.os.Bundle b = new android.os.Bundle();
android.content.Intent i = new android.content.Intent(getActivity(), com.codementor.android.starwarsbattlefrontcommunity.NewContentActivity.class);
b.putInt(com.codementor.android.starwarsbattlefron... | public void onContentAdd() {
android.os.Bundle b = new android.os.Bundle();
android.content.Intent i = new android.content.Intent(getActivity(), com.codementor.android.starwarsbattlefrontcommunity.NewContentActivity.class);
b.putInt(com.codementor.android.starwarsbattlefrontcommunity.CommunityFragment.EXTRA... |
public void writeToParcel(android.os.Parcel dest, int flags) {
dest.writeString(name);
dest.writeDouble(tempKelvin);
dest.writeString(description);
dest.writeInt(humidity);
dest.writeInt(pressure);
dest.writeDouble(windSpeed);
} | public void writeToParcel(android.os.Parcel dest, int flags) {
dest.writeString(name);
dest.writeDouble(tempKelvin);
dest.writeString(description);
dest.writeInt(humidity);
dest.writeDouble(pressure);
dest.writeDouble(windSpeed);
} |
public void setSourceWalker(org.dbflute.erflute.editor.model.diagram_contents.element.node.DiagramWalker sourceWalker) {
if ((this.sourceWalker) != null) {
this.sourceWalker.removeOutgoing(this);
}
this.sourceWalker = sourceWalker;
if ((this.sourceWalker) != null) {
this.sourceWalker.add... | public void setSourceWalker(org.dbflute.erflute.editor.model.diagram_contents.element.node.DiagramWalker sourceWalker) {
if (sourceWalker != null) {
sourceWalker.removeOutgoing(this);
}
this.sourceWalker = sourceWalker;
if (sourceWalker != null) {
sourceWalker.addOutgoing(this);
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.