buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private static void createObject(java.lang.String line) {
Town origin = new Town(line.substring(0, 0));
Town destination = new Town(line.substring(0, 0));
int distance = ((int) (line.charAt(2)));
new Track(origin, destination, distance);
java.lang.System.out.println(origin.getName());
} | private static void createObject(java.lang.String line) {
Town origin = new Town(line.substring(0, 1));
Town destination = new Town(line.substring(1, 2));
int distance = java.lang.Integer.parseInt(line.substring(2));
new Track(origin, destination, distance);
} |
public void onResponse(com.squareup.okhttp.Response response) throws java.io.IOException {
im.actor.runtime.Log.d(im.actor.runtime.se.JavaSeHttpProvider.TAG, ((("Upload part response: " + (request.toString())) + " -> ") + (response.toString())));
if ((response.code()) == 200) {
callback.onUploaded();
... | public void onResponse(com.squareup.okhttp.Response response) throws java.io.IOException {
im.actor.runtime.Log.d(im.actor.runtime.se.JavaSeHttpProvider.TAG, ((("Upload part response: " + (request.toString())) + " -> ") + (response.toString())));
if ((response.code()) == 200) {
callback.onUploaded();
... |
public void hasWon(java.util.List<java.util.UUID> receivers, java.util.UUID winner) {
network.server.SocketClientHandler handler;
for (java.util.UUID user : receivers) {
handler = network.server.ComServer.connectedClients.get(user.toString());
if (handler != null)
handler.sendMessage... | public void hasWon(java.util.List<java.util.UUID> receivers, java.util.UUID winner) {
network.server.SocketClientHandler handler;
for (java.util.UUID user : receivers) {
handler = network.server.ComServer.connectedClients.get(user.toString());
if (handler != null)
handler.sendMessage... |
private void enableInternalDataConnectivity(boolean enable) {
android.util.Log.d(com.motorola.usb.UsbService.TAG, ("enableInternalDataConnectivity(): " + enable));
try {
if (enable) {
mPhoneService.enableDataConnectivity();
}else {
mPhoneService.disableDataConnectivity();... | private void enableInternalDataConnectivity(boolean enable) {
android.util.Log.d(com.motorola.usb.UsbService.TAG, ("enableInternalDataConnectivity(): " + enable));
try {
if (enable) {
mPhoneService.enableDataConnectivity();
}else {
mPhoneService.disableDataConnectivity();... |
public void setAndGet() {
javax.ws.rs.core.Response response = getThing(null);
javax.ws.rs.core.NewCookie sessionCookie = response.getCookies().get("testapp-session");
org.junit.Assert.assertEquals("", response.readEntity(java.lang.String.class));
java.lang.String sessionThing = "My session thing!";
... | public void setAndGet() {
javax.ws.rs.core.Response response = getThing();
javax.ws.rs.core.NewCookie sessionCookie = response.getCookies().get("testapp-session");
org.junit.Assert.assertEquals("", response.readEntity(java.lang.String.class));
java.lang.String sessionThing = "My session thing!";
pos... |
public static void listInv(java.util.ArrayList<com.crooks.InventoryItem> itemList) {
int i = 1;
for (com.crooks.InventoryItem item1 : itemList) {
int totalWeight = (item1.weight) * (item1.itemQuantity);
java.lang.System.out.print(java.lang.String.format("%s. %sx %s - %s - %s lbs\n", i, item1.ite... | public static void listInv(java.util.ArrayList<com.crooks.InventoryItem> itemList) {
int i = 1;
for (com.crooks.InventoryItem item1 : itemList) {
int totalWeight = (item1.weight) * (item1.itemQuantity);
java.lang.System.out.print(java.lang.String.format("%s. %sx %s - %s - %s lbs\n", i, item1.ite... |
public void handleMessage(android.os.Message msg) {
super.handleMessage(msg);
switch (msg.what) {
case com.example.caprin.wexinrecorder.view.AudioRecorderButton.MSG_AUDIO_PREPARED :
mDialogManager.showRecordingDialog();
isRecording = true;
new java.lang.Thread(mGetVoi... | public void handleMessage(android.os.Message msg) {
switch (msg.what) {
case com.example.caprin.wexinrecorder.view.AudioRecorderButton.MSG_AUDIO_PREPARED :
mDialogManager.showRecordingDialog();
isRecording = true;
new java.lang.Thread(mGetVoiceLevelRunnable).start();
... |
public static boolean hasRole(sx.blah.discord.handle.obj.IUser user, sx.blah.discord.api.IDiscordClient bot, java.lang.String roleName) {
boolean result = false;
for (sx.blah.discord.handle.obj.IRole role : user.getRolesForGuild(bot.getGuildByID(Karren.conf.getGuildId()))) {
if (role.getName().equals(ro... | public static boolean hasRole(sx.blah.discord.handle.obj.IUser user, sx.blah.discord.api.IDiscordClient bot, java.lang.String roleName) {
boolean result = false;
if (roleName != null) {
for (sx.blah.discord.handle.obj.IRole role : user.getRolesForGuild(bot.getGuildByID(Karren.conf.getGuildId()))) {
... |
public void doubleClick(org.eclipse.jface.viewers.DoubleClickEvent event) {
org.eclipse.jface.viewers.IStructuredSelection sel = ((org.eclipse.jface.viewers.IStructuredSelection) (event.getSelection()));
java.lang.Object clicked = sel.getFirstElement();
if (clicked instanceof org.springframework.ide.eclipse... | public void doubleClick(org.eclipse.jface.viewers.DoubleClickEvent event) {
org.eclipse.jface.viewers.IStructuredSelection sel = ((org.eclipse.jface.viewers.IStructuredSelection) (event.getSelection()));
java.lang.Object clicked = sel.getFirstElement();
if (clicked instanceof org.springframework.ide.eclipse... |
private static void getData() {
ClassificationMethods.data = DataRetrievalLayer.GetData();
ClassificationMethods.activeData = ((java.util.ArrayList<java.util.ArrayList<java.lang.Double>>) (ClassificationMethods.data.subList(0, 1347)));
ClassificationMethods.nonActiveData = ((java.util.ArrayList<java.util.Ar... | private static void getData() {
ClassificationMethods.data = DataRetrievalLayer.GetData();
ClassificationMethods.activeData = new java.util.ArrayList<java.util.ArrayList<java.lang.Double>>(ClassificationMethods.data.subList(0, 1347));
ClassificationMethods.nonActiveData = new java.util.ArrayList<java.util.A... |
protected java.lang.Boolean checkInstall() {
if (installed)
return ;
java.io.File f = new java.io.File(installPath);
if ((f.exists()) && (!(f.isDirectory()))) {
return true;
}else {
return false;
}
} | protected java.lang.Boolean checkInstall() {
if (installed)
return true;
java.io.File f = new java.io.File(installPath);
if ((f.exists()) && (!(f.isDirectory()))) {
return true;
}else {
return false;
}
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
android.support.v7.widget.Toolbar toolbar = ((android.support.v7.widget.Toolbar) (findViewById(R.id.toolbar)));
setSupportActionBar(toolbar);
getSupportAction... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
android.support.v7.widget.Toolbar toolbar = ((android.support.v7.widget.Toolbar) (findViewById(R.id.toolbar)));
setSupportActionBar(toolbar);
getSupportAction... |
public org.apache.karaf.features.internal.region.Subsystem createSubsystem(java.lang.String name, boolean acceptDependencies) {
if ((feature) != null) {
throw new java.lang.UnsupportedOperationException("Can not create application subsystems inside a feature subsystem");
}
java.lang.String childName... | public org.apache.karaf.features.internal.region.Subsystem createSubsystem(java.lang.String name, boolean acceptDependencies) {
if ((feature) != null) {
throw new java.lang.UnsupportedOperationException("Can not create application subsystems inside a feature subsystem");
}
java.lang.String childName... |
public boolean isReliable(java.util.List<java.lang.String> contexts_pattern, int dataSize, java.util.Set<java.lang.String> reliableInstances, java.util.Set<io.github.infolis.model.StudyContext> contexts_seeds, io.github.infolis.infolink.patternLearner.Reliability r) throws java.io.IOException, org.apache.lucene.queryPa... | public boolean isReliable(java.util.List<java.lang.String> contexts_pattern, int dataSize, java.util.Set<java.lang.String> reliableInstances, java.util.Map<java.lang.String, java.util.Set<io.github.infolis.model.StudyContext>> contexts_seeds, io.github.infolis.infolink.patternLearner.Reliability r) throws java.io.IOExc... |
public void updateEntity() {
if ((isErrored()) && (worldObj.isRemote))
worldObj.spawnParticle("angryVillager", ((xCoord) + (worldObj.rand.nextDouble())), ((yCoord) + (worldObj.rand.nextDouble())), ((zCoord) + (worldObj.rand.nextDouble())), 0, (-0.05), 0);
if (cpw.mods.fml.common.Loader.isModLoaded(... | public void updateEntity() {
if ((isErrored()) && (!(worldObj.isRemote)))
worldObj.spawnParticle("angryVillager", ((xCoord) + (worldObj.rand.nextDouble())), ((yCoord) + (worldObj.rand.nextDouble())), ((zCoord) + (worldObj.rand.nextDouble())), 0, (-0.05), 0);
if (cpw.mods.fml.common.Loader.isModLoad... |
public void play() {
try {
mPlayer.setDataSource(mSource);
mPlayer.setOnPreparedListener(new android.media.MediaPlayer.OnPreparedListener() {
@java.lang.Override
public void onPrepared(android.media.MediaPlayer mediaPlayer) {
mPlayer.start();
m... | public void play() {
try {
if ((mPlayer) == null) {
mPlayer = new android.media.MediaPlayer();
}
mPlayer.setDataSource(mSource);
mPlayer.setOnPreparedListener(new android.media.MediaPlayer.OnPreparedListener() {
@java.lang.Override
public void onPr... |
public java.lang.Object pretestedIntegration(java.lang.String strategy, java.lang.String branch, java.lang.String repository) {
javaposse.jobdsl.dsl.Preconditions.checkArgument(strategies.contains(strategy), ("Strategy must be one of " + (strategies)));
org.jenkinsci.plugins.pretestedintegration.IntegrationStra... | public java.lang.Object pretestedIntegration(java.lang.String strategy, java.lang.String branch, java.lang.String repository) {
javaposse.jobdsl.dsl.Preconditions.checkArgument(strategies.contains(strategy), ("Strategy must be one of " + (strategies)));
org.jenkinsci.plugins.pretestedintegration.IntegrationStra... |
private static void findAssociationRules() {
try {
if ((apriori_map.AssociationRules.allFrequentItemsets.size()) >= 2)
apriori_map.AssociationRules.findRulesForPairs();
if ((apriori_map.AssociationRules.allFrequentItemsets.size()) >= 3)
apriori_map.AssociationRules.f... | public void findAssociationRules() {
try {
if ((apriori_map.AssociationRules.allFrequentItemsets.size()) >= 2)
apriori_map.AssociationRules.findRulesForPairs();
if ((apriori_map.AssociationRules.allFrequentItemsets.size()) >= 3)
apriori_map.AssociationRules.findRules... |
public void setSelectionInterval(int index0, int index1) {
super.setSelectionInterval(index0, index1);
java.util.HashSet<T> proxies = new java.util.HashSet<T>();
for (int i = index0; i <= index1; i++) {
T proxy = model.getProxy(i);
if (proxy != null)
proxies.add(proxy);
... | public void setSelectionInterval(int index0, int index1) {
super.setSelectionInterval(index0, index1);
java.util.HashSet<T> proxies = new java.util.HashSet<T>();
for (int i = index0; i <= index1; i++) {
T proxy = model.getProxy(i, false);
if (proxy != null)
proxies.add(proxy);
... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.delete :
com.zettig.tracker.Utils.ManagerAlertDialog.showDialog(getActivity(), R.string.question_delete_character, R.string.yes, R.string.no, onDelete, onDismisDelete);
break;
... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.delete :
com.zettig.tracker.Utils.ManagerAlertDialog.showDialog(getActivity(), R.string.question_delete_character, R.string.yes, R.string.no, onDelete, onDismisDelete);
break;
... |
public void testQueryProgressParallel() throws java.lang.Throwable {
final java.lang.String SCRIPT_TEXT = (("set hive.support.concurrency = false;\n" + ("set hive.exec.parallel = true;\n" + "select count(*) from ")) + (org.apache.hive.beeline.TestBeeLineWithArgs.tableName)) + ";\n";
final java.lang.String EXPEC... | public void testQueryProgressParallel() throws java.lang.Throwable {
final java.lang.String SCRIPT_TEXT = (("set hive.support.concurrency = false;\n" + ("set hive.exec.parallel = true;\n" + "select count(*) from ")) + (org.apache.hive.beeline.TestBeeLineWithArgs.tableName)) + ";\n";
final java.lang.String EXPEC... |
public org.springframework.web.servlet.ModelAndView listEnterStock(com.fh.entity.Page page, @org.springframework.web.bind.annotation.RequestParam(value = "out", required = false)
java.lang.String out) throws java.lang.Exception {
org.springframework.web.servlet.ModelAndView mv = this.getModelAndView();
com.fh.u... | public org.springframework.web.servlet.ModelAndView listEnterStock(com.fh.entity.Page page, @org.springframework.web.bind.annotation.RequestParam(value = "out", required = false)
boolean out) throws java.lang.Exception {
org.springframework.web.servlet.ModelAndView mv = this.getModelAndView();
com.fh.util.PageD... |
public void onClick(android.view.View v) {
final int buttonId = v.getId();
android.util.Log.d(TAG, "START REC");
recording = true;
recordFlag = true;
com.capstone.zacharyverbeck.loopspace.UI.LoopActivity.RecordingTask task = new com.capstone.zacharyverbeck.loopspace.UI.LoopActivity.RecordingTask();
... | public void onClick(android.view.View v) {
final int buttonId = v.getId();
android.util.Log.d(TAG, "START REC");
recording = true;
recordFlag = true;
com.capstone.zacharyverbeck.loopspace.UI.LoopActivity.RecordingTask task = new com.capstone.zacharyverbeck.loopspace.UI.LoopActivity.RecordingTask();
... |
protected int __offset(int vtable_offset) {
int vtable = (bb_pos) - (bb.getInt(bb_pos));
return vtable_offset < (bb.getShort(vtable)) ? bb.getShort((vtable + vtable_offset)) : 0;
} | protected int __offset(int vtable_offset) {
if ((bb) == null)
return 0;
int vtable = (bb_pos) - (bb.getInt(bb_pos));
return vtable_offset < (bb.getShort(vtable)) ? bb.getShort((vtable + vtable_offset)) : 0;
} |
public org.springframework.web.servlet.ModelAndView registerInfo(javax.servlet.http.HttpSession session) throws java.lang.Exception {
java.lang.System.out.println(((java.lang.String) (session.getAttribute("id"))));
userDto = userService.getUserInfo(((java.lang.String) (session.getAttribute("id"))));
org.spr... | public org.springframework.web.servlet.ModelAndView registerInfo(javax.servlet.http.HttpSession session) throws java.lang.Exception {
userDto = userService.getUserInfo(((java.lang.String) (session.getAttribute("id"))));
org.springframework.web.servlet.ModelAndView mav = new org.springframework.web.servlet.Model... |
public void renderPage(com.shockwave.pdfium.PdfDocument doc, android.view.Surface surface, int pageIndex) {
synchronized(doc.Lock) {
try {
int dpi = mContext.getResources().getDisplayMetrics().densityDpi;
nativeRenderPage(doc.mNativePagesPtr.get(pageIndex), surface, dpi);
} c... | public void renderPage(com.shockwave.pdfium.PdfDocument doc, android.view.Surface surface, int pageIndex) {
synchronized(doc.Lock) {
try {
int dpi = mContext.getResources().getDisplayMetrics().densityDpi;
nativeRenderPage(doc.mNativePagesPtr.get(pageIndex), surface, dpi);
} c... |
public void run() {
downloadProgressNotificationHandler.providerRemoved(resourceID, storeName, providerStatistics, downloadManager, peerId);
}
});
}
} | } |
private double logYGivenComponent(edu.neu.ccs.pyramid.dataset.MultiLabel y, int k) {
double sum = 0.0;
for (int l = 0; l < (numLabels); l++) {
if (y.matchClass(l)) {
sum += logClassProbs[k][l];
}else {
sum += 1 - (logClassProbs[k][l]);
}
}
return sum;
} | private double logYGivenComponent(edu.neu.ccs.pyramid.dataset.MultiLabel y, int k) {
double sum = 0.0;
for (int l = 0; l < (numLabels); l++) {
if (y.matchClass(l)) {
sum += logClassProbs[k][l][1];
}else {
sum += logClassProbs[k][l][0];
}
}
return sum;
} |
public void setLabels() {
disclosurePanel.getHeaderTextAccessor().setText(loc.getMenu("Advanced"));
btnBold.setText(loc.getMenu("Bold.Short"));
btnItalic.setText(loc.getMenu("Italic.Short"));
btnLatex.setText(loc.getPlain("LaTeXFormula"));
btnSerif.setText("Serif");
if ((advancedPanel) != null) ... | public void setLabels() {
disclosurePanel.getHeaderTextAccessor().setText(loc.getMenu("Advanced"));
btnBold.setText(loc.getMenu("Bold.Short"));
btnItalic.setText(loc.getMenu("Italic.Short"));
btnLatex.setText(loc.getPlain("LaTeXFormula"));
btnSerif.setText(loc.getMenu("Serif"));
if ((advancedPan... |
private void debugMyNode(org.w3c.dom.Node inNode, java.lang.String fileName) {
try {
org.jdom.output.XMLOutputter outputter = new org.jdom.output.XMLOutputter();
org.jdom.Document tempDoc = new org.jdom.input.DOMBuilder().build(inNode.getOwnerDocument());
java.io.FileOutputStream output = ne... | private void debugMyNode(org.w3c.dom.Node inNode, java.lang.String fileName) {
try (java.io.FileOutputStream output = new java.io.FileOutputStream(fileName)) {
org.jdom.output.XMLOutputter outputter = new org.jdom.output.XMLOutputter();
org.jdom.Document tempDoc = new org.jdom.input.DOMBuilder().bui... |
public java.lang.String toString(com.company.Books pBook) {
float[] rtnRatingsArr = this.getRatings(pBook);
return ((((((rtnRatingsArr[0]) + ", ") + (rtnRatingsArr[1])) + ", ") + (rtnRatingsArr[2])) + ", ") + (rtnRatingsArr[3]);
} | public java.lang.String toString(com.company.Books pBook) {
float[] rtnRatingsArr = this.getRatings(pBook);
return ((((rtnRatingsArr[0]) + ", ") + (rtnRatingsArr[1])) + ", ") + (rtnRatingsArr[2]);
} |
private boolean isNumeric(java.lang.String s) {
int num;
try {
num = java.lang.Integer.parseInt(s);
} catch (java.lang.NumberFormatException e) {
return false;
} catch (java.lang.NullPointerException e) {
return false;
}
if (num < 0)
return false;
return ... | private boolean isNumeric(java.lang.String s) {
int num;
try {
num = java.lang.Integer.parseInt(s);
} catch (java.lang.NumberFormatException e) {
return false;
} catch (java.lang.NullPointerException e) {
return false;
}
if (num < 1)
return false;
return ... |
public void actionPerformed(java.awt.event.ActionEvent e) {
if (0 < (selectedValuesList.size())) {
for (java.lang.String tmp : selectedValuesList) {
java.lang.String[] splited = tmp.split("\\s+");
pipeLock.lock();
try {
writeProc.write(((servergui.ServerFr... | public void actionPerformed(java.awt.event.ActionEvent e) {
if (0 < (selectedValuesList.size())) {
for (java.lang.String tmp : selectedValuesList) {
java.lang.String[] splited = tmp.split("\\s+");
pipeLock.lock();
try {
writeProc.write(((servergui.ServerFr... |
public boolean add(T value) {
if ((head) == null) {
head = new LNode(value);
tail = head;
}else {
MyLinkedList<T>.LNode p = new LNode(value);
p.setPrev(tail);
tail.setNext(p);
tail = tail.getNext();
}
(size)++;
return true;
} | public boolean add(T value) {
if ((head) == null) {
head = new LNode(value);
tail = head;
}else {
tail.setNext(new LNode(value));
tail = tail.getNext();
}
(size)++;
return true;
} |
public edu.chl.proton.model.Document createDocument(edu.chl.proton.model.DocumentType documentType) {
if (documentType == null) {
return null;
}
if (documentType == (DocumentType.PLAIN)) {
}else
if (documentType == (DocumentType.MARKDOWN)) {
return new edu.chl.proton.model.Ma... | public edu.chl.proton.model.Document createDocument(edu.chl.proton.model.DocumentType documentType) {
if (documentType == null) {
return null;
}
if (documentType == (DocumentType.PLAIN)) {
}else
if (documentType == (DocumentType.MARKDOWN)) {
return new edu.chl.proton.model.Ma... |
public java.lang.String getProperty(final java.lang.String key, final java.lang.ClassLoader cl) {
final java.lang.String propertyValueFromFile = fileResolver.getProperty(key, cl);
java.lang.String propertyValue = null;
if (propertyValueFromFile != null) {
propertyValue = jndiPropertyResolver.getProp... | public java.lang.String getProperty(final java.lang.String key, final java.lang.ClassLoader cl) {
java.lang.String propertyValue = null;
final java.lang.String propertyValueFromFile = fileResolver.getProperty(key, cl);
if (propertyValueFromFile != null) {
propertyValue = jndiPropertyResolver.getProp... |
public com.netflix.eureka2.utils.rx.ResourceObservable.ResourceUpdate<com.netflix.eureka2.utils.rx.ResourceObservableTest.ItemUpdate> reload(java.util.Set<com.netflix.eureka2.utils.rx.ResourceObservableTest.ItemUpdate> currentSnapshot) {
java.util.Set<com.netflix.eureka2.utils.rx.ResourceObservableTest.ItemUpdate> ... | public com.netflix.eureka2.utils.rx.ResourceObservable.ResourceUpdate<com.netflix.eureka2.utils.rx.ResourceObservableTest.ItemUpdate> reload(java.util.Set<com.netflix.eureka2.utils.rx.ResourceObservableTest.ItemUpdate> currentSnapshot) {
if ((error) != null) {
throw error;
}
java.util.Set<com.netfli... |
public org.springframework.web.servlet.ModelAndView avaliableByCityAndDate(@org.springframework.web.bind.annotation.RequestParam
java.lang.String city, @org.springframework.web.bind.annotation.RequestParam
java.lang.String date, org.springframework.ui.ModelMap model) {
java.util.Date utilDate = null;
try {
... | public org.springframework.web.servlet.ModelAndView avaliableByCityAndDate(@org.springframework.web.bind.annotation.RequestParam
java.lang.String city, @org.springframework.web.bind.annotation.RequestParam
java.lang.String date, org.springframework.ui.ModelMap model) throws java.text.ParseException {
java.util.Date... |
public static com.google.api.codegen.util.Name upperCamel(java.lang.String... pieces) {
java.util.List<com.google.api.codegen.util.Name.NamePiece> namePieces = new java.util.ArrayList<>();
for (java.lang.String piece : pieces) {
piece = piece.replace("IAM", "Iam");
com.google.api.codegen.util.Na... | public static com.google.api.codegen.util.Name upperCamel(java.lang.String... pieces) {
java.util.List<com.google.api.codegen.util.Name.NamePiece> namePieces = new java.util.ArrayList<>();
for (java.lang.String piece : pieces) {
com.google.api.codegen.util.Name.validateCamel(piece, true);
namePi... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (isOnline()) {
setContentView(R.layout.activity_main);
}else {
setContentView(R.layout.activity_layout_offline);
return ;
}
movieRecyclerView = ((android.support.v7.widget.R... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!(isOnline())) {
setContentView(R.layout.activity_layout_offline);
return ;
}
setContentView(R.layout.activity_main);
movieRecyclerView = ((android.support.v7.widget.RecyclerView) ... |
private boolean statusOK(jmri.jmrit.logix.OBlock block) {
if ((_engineer) != null) {
if (((_engineer.getRunState()) == (jmri.jmrit.logix.Warrant.WAIT_FOR_CLEAR)) || ((_engineer.getRunState()) == (jmri.jmrit.logix.Warrant.HALT))) {
_message = jmri.jmrit.logix.Bundle.getMessage("BlockRougeOccupied... | private boolean statusOK(jmri.jmrit.logix.OBlock block) {
if ((_engineer) != null) {
if (((_engineer.getRunState()) == (jmri.jmrit.logix.Warrant.WAIT_FOR_CLEAR)) || ((_engineer.getRunState()) == (jmri.jmrit.logix.Warrant.HALT))) {
_message = jmri.jmrit.logix.Bundle.getMessage("BlockRougeOccupied... |
public java.io.File prevElement() {
if ((cnt) >= 0) {
--(cnt);
java.lang.System.out.println(cnt);
return fileList.get(cnt);
}
cnt = (fileList.size()) - 1;
java.lang.System.out.println(cnt);
return null;
} | public java.io.File prevElement() {
if ((cnt) > 1) {
--(cnt);
java.lang.System.out.println(((cnt) - 1));
return fileList.get(((cnt) - 1));
}
cnt = (fileList.size()) - 1;
java.lang.System.out.println(cnt);
return null;
} |
public final gamelogic.SpecialSymbolColour specialRandom() {
final int num = (gamelogic.SymbolColour.values().length) - 1;
java.util.Random random = new java.util.Random();
int squareNumber = random.nextInt(num);
gamelogic.SpecialSymbolColour rand = SpecialSymbolColour.BLACK;
rand = gamelogic.Specia... | public final gamelogic.SpecialSymbolColour specialRandom() {
final int num = (gamelogic.SpecialSymbolColour.values().length) - 1;
java.util.Random random = new java.util.Random();
int squareNumber = random.nextInt(num);
gamelogic.SpecialSymbolColour rand = SpecialSymbolColour.BLACK;
rand = gamelogic... |
public void onClick(android.content.DialogInterface dialog, int which) {
newUserId = ulc.createUser(userNameET.getText().toString());
ca.ualberta.cs.scandaloutraveltracker.UserController uc = new ca.ualberta.cs.scandaloutraveltracker.UserController(new ca.ualberta.cs.scandaloutraveltracker.User(newUserId));
... | public void onClick(android.content.DialogInterface dialog, int which) {
newUserId = ulc.createUser(userNameET.getText().toString());
ca.ualberta.cs.scandaloutraveltracker.UserController uc = new ca.ualberta.cs.scandaloutraveltracker.UserController(new ca.ualberta.cs.scandaloutraveltracker.User(newUserId));
... |
private void initializeUiComponents() {
tabPane = new javax.swing.JTabbedPane();
tabPane.setTabLayoutPolicy(javax.swing.JTabbedPane.WRAP_TAB_LAYOUT);
tabPane.addTab("intro", createPanel("GUI Component Gallery"));
tabPane.addTab("frets", new com.nineworldsdeep.vMuse.gui.frets.FretBoardPanel(false));
... | private void initializeUiComponents() {
tabPane = new javax.swing.JTabbedPane();
tabPane.setTabLayoutPolicy(javax.swing.JTabbedPane.WRAP_TAB_LAYOUT);
tabPane.addTab("intro", createPanel("GUI Component Gallery"));
tabPane.addTab("frets", new com.nineworldsdeep.vMuse.gui.frets.FretBoardPanel(true));
t... |
public void testSingleScriptFunction() throws java.lang.Exception {
debugger.addResponse("Stop", Debugger.Response.Ignore);
debugger.addResponse("No", Debugger.Response.Choose);
script.say("In main script.");
assertEquals(TeaseScript.Timeout, script.reply(new teaselib.ScriptFunction() {
@java.la... | public void testSingleScriptFunction() throws java.lang.Exception {
debugger.addResponse("Stop", Debugger.Response.Ignore);
script.say("In main script.");
assertEquals(TeaseScript.Timeout, script.reply(new teaselib.ScriptFunction() {
@java.lang.Override
public void run() {
script... |
public void deactivate(tom.lightwaverf.model.ItemState item) {
if ((item instanceof tom.lightwaverf.model.ScheduledItem) && ((((tom.lightwaverf.model.ScheduledItem) (item)).getEndTime()) == null)) {
return ;
}
unit.sendCommand(generateDeactivateCommand(item));
item.setActivated(false);
} | public void deactivate(tom.lightwaverf.model.ItemState item) {
item.setActivated(false);
if ((item instanceof tom.lightwaverf.model.ScheduledItem) && ((((tom.lightwaverf.model.ScheduledItem) (item)).getEndTime()) == null)) {
return ;
}
unit.sendCommand(generateDeactivateCommand(item));
} |
private boolean jj_3R_12() {
org.sbml.jsbml.text.parser.Token xsp;
xsp = jj_scanpos;
if (jj_3R_15()) {
jj_scanpos = xsp;
if (jj_3R_16()) {
jj_scanpos = xsp;
if (jj_3R_17()) {
jj_scanpos = xsp;
if (jj_3R_18()) {
retur... | private boolean jj_3R_12() {
org.sbml.jsbml.text.parser.Token xsp;
xsp = jj_scanpos;
if (jj_3R_15()) {
jj_scanpos = xsp;
if (jj_3R_16()) {
jj_scanpos = xsp;
if (jj_3R_17()) {
jj_scanpos = xsp;
if (jj_3R_18())
return ... |
public void run() {
long elapsed = (android.os.SystemClock.uptimeMillis()) - start;
float t = java.lang.Math.max((1 - (interpolator.getInterpolation((((float) (elapsed)) / duration)))), 0);
marker.setAnchor(0.5F, (1.0F + (14 * t)));
if (t > 0.0) {
handler.postDelayed(this, 15);
}else {
... | public void run() {
long elapsed = (android.os.SystemClock.uptimeMillis()) - start;
float t = java.lang.Math.max((1 - (interpolator.getInterpolation((((float) (elapsed)) / duration)))), 0);
marker.setAnchor(0.5F, (1.0F + (14 * t)));
if (t > 0.0) {
handler.postDelayed(this, 15);
}else {
}... |
public void onReceive(android.content.Context context, android.content.Intent intent) {
android.content.Intent startSoundIntent = new android.content.Intent(context, com.philips.lighting.alarm.AlarmSoundService.class);
startSoundIntent.putExtras(intent);
context.startService(startSoundIntent);
android.c... | public void onReceive(android.content.Context context, android.content.Intent intent) {
android.content.Intent startSoundIntent = new android.content.Intent(context, com.philips.lighting.alarm.AlarmSoundService.class);
context.startService(startSoundIntent);
android.content.Intent startActivityIntent = new ... |
private void releasePool() {
by.tr.library.pool.ConnectionPool.closed.set(true);
try {
java.util.concurrent.TimeUnit.SECONDS.sleep(by.tr.library.pool.ConnectionPool.CLOSE_TIMEOUT_SEC);
for (by.tr.library.pool.ProxyConnection connection : availableConnections) {
try {
... | private void releasePool() {
by.tr.library.pool.ConnectionPool.closed.set(true);
for (by.tr.library.pool.ProxyConnection connection : availableConnections) {
try {
connection.closeConnection();
} catch (java.sql.SQLException ex) {
}
}
if (!(usedConnections.isEmpty()))... |
public T dequeue() {
synchronized(queLocker) {
while ((i_size) == 0) {
if ((producers) == 0) {
return null;
}
try {
queLocker.wait();
} catch (java.lang.Exception e) {
e.printStackTrace();
}
}... | public T dequeue() {
synchronized(queLocker) {
while ((i_size) == 0) {
if ((producers) == 0) {
return null;
}
try {
queLocker.wait();
} catch (java.lang.Exception e) {
e.printStackTrace();
}
}... |
public long saveChallengeTag(cat.ie.challengeaccepted.to.ChallengeTag challengeTag) {
android.content.ContentValues values = new android.content.ContentValues();
values.put(TablesContract.ChallengeTagContract._ID, challengeTag.getId());
values.put(TablesContract.ChallengeTagContract.COLUMN_ID_CHALLENGE, cha... | public long saveChallengeTag(cat.ie.challengeaccepted.to.ChallengeTag challengeTag) {
android.content.ContentValues values = new android.content.ContentValues();
values.put(TablesContract.ChallengeTagContract.COLUMN_ID_CHALLENGE, challengeTag.getIdChallenge());
values.put(TablesContract.ChallengeTagContract... |
public boolean equals(java.lang.Object obj) {
if (!(obj instanceof com.microsoft.azure.management.resources.fluentcore.arm.Region)) {
return false;
}else
if (obj == (this)) {
return true;
}else {
com.microsoft.azure.management.resources.fluentcore.arm.Region rhs =... | public boolean equals(java.lang.Object obj) {
if (!(obj instanceof com.microsoft.azure.management.resources.fluentcore.arm.Region)) {
return false;
}else
if (obj == (this)) {
return true;
}else {
com.microsoft.azure.management.resources.fluentcore.arm.Region rhs =... |
public java.lang.Iterable<me.sjtumeow.meow.model.result.AnswerSummaryResult> getAnswerSummary(java.lang.Iterable<me.sjtumeow.meow.model.Answer> answers) {
java.util.List<me.sjtumeow.meow.model.result.AnswerSummaryResult> result = new java.util.ArrayList<me.sjtumeow.meow.model.result.AnswerSummaryResult>();
for ... | public java.lang.Iterable<me.sjtumeow.meow.model.result.AnswerSummaryResult> getAnswerSummary(java.lang.Iterable<me.sjtumeow.meow.model.Answer> answers) {
java.util.List<me.sjtumeow.meow.model.result.AnswerSummaryResult> result = new java.util.ArrayList<me.sjtumeow.meow.model.result.AnswerSummaryResult>();
for ... |
private static boolean fragmentNameIsSecondContainer() {
if ((tw.gov.tycg.app.android.etransportation.ui.fragment.BaseFragment.fm.getBackStackEntryCount()) > 0) {
java.lang.String lastTag = tw.gov.tycg.app.android.etransportation.ui.fragment.BaseFragment.fm.getBackStackEntryAt(((tw.gov.tycg.app.android.etra... | public static boolean fragmentNameIsSecondContainer() {
if ((tw.gov.tycg.app.android.etransportation.ui.fragment.BaseFragment.fm.getBackStackEntryCount()) > 0) {
java.lang.String lastTag = tw.gov.tycg.app.android.etransportation.ui.fragment.BaseFragment.fm.getBackStackEntryAt(((tw.gov.tycg.app.android.etran... |
private ai.subut.kurjun.metadata.common.DefaultMetadata makeMetadata(java.sql.ResultSet current) throws java.sql.SQLException, org.apache.commons.codec.DecoderException {
java.lang.String md5hex = current.getString(SqlStatements.CHECKSUM_COLUMN);
byte[] md5 = org.apache.commons.codec.binary.Hex.decodeHex(md5hex... | private ai.subut.kurjun.metadata.common.DefaultMetadata makeMetadata(java.sql.ResultSet current) throws java.sql.SQLException, org.apache.commons.codec.DecoderException {
java.lang.String md5hex = current.getString(SqlStatements.CHECKSUM_COLUMN);
byte[] md5 = org.apache.commons.codec.binary.Hex.decodeHex(md5hex... |
public void updateShowStats() {
java.util.List<java.lang.String> series = getSeries(2);
for (int i = 0; i < (series.size()); i += 1) {
updateShowStats(series.get(i));
}
} | public void updateShowStats() {
java.util.List<java.lang.String> series = getSeries(2, false, null);
for (int i = 0; i < (series.size()); i += 1) {
updateShowStats(series.get(i));
}
} |
public static void main(java.lang.String[] args) {
wr.leetcode.algo.maximum_subarray.Solution sol = new wr.leetcode.algo.maximum_subarray.Solution();
int[] arr = new int[]{ -2 , 1 , -3 , 4 , -1 , 2 , 1 , -5 , 4 };
java.lang.System.out.println(sol.maxSubArray(arr));
} | public static void main(java.lang.String[] args) {
wr.leetcode.algo.maximum_subarray.Solution sol = new wr.leetcode.algo.maximum_subarray.Solution();
int[] arr = new int[]{ -2 , 1 , -3 , 4 , -1 , 2 , 1 , -5 , 4 };
int[] b = new int[]{ -1 };
java.lang.System.out.println(sol.maxSubArray(arr));
java.la... |
private void setSideMenuWidth(final com.reactnativenavigation.views.ContentView sideMenuView) {
sideMenuView.setOnDisplayListener(new com.reactnativenavigation.screens.Screen.OnDisplayListener() {
@java.lang.Override
public void onDisplay() {
android.view.ViewGroup.LayoutParams layoutPar... | private void setSideMenuWidth(final com.reactnativenavigation.views.ContentView sideMenuView, final int width) {
sideMenuView.setOnDisplayListener(new com.reactnativenavigation.screens.Screen.OnDisplayListener() {
@java.lang.Override
public void onDisplay() {
android.view.ViewGroup.Layou... |
public V remove(K key) {
com.jwetherell.algorithms.data_structures.BinarySearchTree.Node<K> node = tree.removeValue(key);
V value = null;
if (node instanceof com.jwetherell.algorithms.data_structures.TreeMap.TreeMapNode) {
com.jwetherell.algorithms.data_structures.TreeMap.TreeMapNode<K, V> treeMapNo... | public V remove(K key) {
com.jwetherell.algorithms.data_structures.BinarySearchTree.Node<K> node = tree.removeValue(key);
V value = null;
if (node instanceof com.jwetherell.algorithms.data_structures.TreeMap.TreeMapNode) {
com.jwetherell.algorithms.data_structures.TreeMap.TreeMapNode<K, V> treeMapNo... |
private void printCallback() {
TableGrader.GradingWeight gradingWeight = new TableGrader.GradingWeight();
java.util.ArrayList<Table> tables = timeTable.getTables();
gradingWeight.freeDays = freeDaysCheckBox.isSelected();
gradingWeight.startHour = startHourCheckBox.isSelected();
gradingWeight.windows... | private void printCallback() {
TableGrader.GradingWeight gradingWeight = new TableGrader.GradingWeight();
gradingWeight.freeDays = freeDaysCheckBox.isSelected();
gradingWeight.startHour = startHourCheckBox.isSelected();
gradingWeight.windows = windowsCheckBox.isSelected();
timeTable.gradeTables(grad... |
public void createTopic(java.lang.String topic, int partitions, int replicationFactor) {
org.I0Itec.zkclient.ZkClient zookeeperClient = new org.I0Itec.zkclient.ZkClient(zkEndpoint, 10000, 10000, kafka.utils.ZKStringSerializer$.MODULE$);
kafka.admin.AdminUtils.createTopic(zookeeperClient, topic, partitions, repl... | public void createTopic(java.lang.String topic, int partitions, int replicationFactor) {
org.I0Itec.zkclient.ZkClient zookeeperClient = new org.I0Itec.zkclient.ZkClient(zkEndpoint, 10000, 10000, kafka.utils.ZKStringSerializer$.MODULE$);
kafka.admin.AdminUtils.createTopic(zookeeperClient, topic, partitions, repl... |
public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
io.gravitee.definition.model.Api api = ((io.gravitee.definition.model.Api) (o));
return (java.util.Objects.equals(id, api.id)) && (java.u... | public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
io.gravitee.definition.model.Api api = ((io.gravitee.definition.model.Api) (o));
return java.util.Objects.equals(id, api.id);
} |
public boolean equals(java.lang.Object x) {
if (!(x instanceof jcmp.DocCompare.DefaultIdentity)) {
return false;
}
try {
jcmp.DocCompare.DefaultIdentity d = ((jcmp.DocCompare.DefaultIdentity) (x));
for (int i = 0; i < (nodes.length); i++) {
if (!(d.nodes[i].equals(nodes[i... | public boolean equals(java.lang.Object x) {
if ((x == null) || (!(x instanceof jcmp.DocCompare.DefaultIdentity))) {
return false;
}
jcmp.DocCompare.DefaultIdentity d = ((jcmp.DocCompare.DefaultIdentity) (x));
for (int i = 0; i < (nodes.length); i++) {
if (!(d.nodes[i].equals(nodes[i])))
... |
public void test() throws java.lang.Exception {
testConcurrentCreate();
if (true)
return ;
testSchemaSearchPath();
testAlterSequenceColumn();
testAlterSequence();
testCache();
testTwo();
testMetaTable();
testCreateWithMinValue();
testCreateWithMaxValue();
testCre... | public void test() throws java.lang.Exception {
testConcurrentCreate();
testSchemaSearchPath();
testAlterSequenceColumn();
testAlterSequence();
testCache();
testTwo();
testMetaTable();
testCreateWithMinValue();
testCreateWithMaxValue();
testCreationErrors();
testCreateSql();
... |
public com.change_vision.jude.api.inf.model.IEREntity convert(com.change_vision.astah.extension.plugin.dbreverse.reverser.model.TableInfo tableInfo) {
com.change_vision.jude.api.inf.model.IEREntity entity = null;
try {
java.lang.String name = tableInfo.getName();
entity = editor.createEREntity(s... | public com.change_vision.jude.api.inf.model.IEREntity convert(com.change_vision.astah.extension.plugin.dbreverse.reverser.model.TableInfo tableInfo) {
com.change_vision.jude.api.inf.model.IEREntity entity = null;
try {
java.lang.String name = tableInfo.getName();
entity = editor.createEREntity(s... |
public java.lang.String runtime() {
java.lang.management.RuntimeMXBean runtime = java.lang.management.ManagementFactory.getRuntimeMXBean();
long millis = runtime.getUptime();
long second = (millis / 1000) % 60;
long minute = (millis / (1000 * 60)) % 60;
long hour = (millis / ((1000 * 60) * 60)) % 24... | public void runtime() {
java.lang.management.RuntimeMXBean runtime = java.lang.management.ManagementFactory.getRuntimeMXBean();
long millis = runtime.getUptime();
long second = (millis / 1000) % 60;
long minute = (millis / (1000 * 60)) % 60;
long hour = (millis / ((1000 * 60) * 60)) % 24;
java.l... |
boolean match(org.overmind.rects.Point point) {
double sum = (((org.overmind.rects.AreaUtils.byThreePoints(a, b, point)) + (org.overmind.rects.AreaUtils.byThreePoints(b, c, point))) + (org.overmind.rects.AreaUtils.byThreePoints(c, d, point))) + (org.overmind.rects.AreaUtils.byThreePoints(a, d, point));
java.lan... | boolean match(org.overmind.rects.Point point) {
double sum = (((org.overmind.rects.AreaUtils.byThreePoints(a, b, point)) + (org.overmind.rects.AreaUtils.byThreePoints(b, c, point))) + (org.overmind.rects.AreaUtils.byThreePoints(c, d, point))) + (org.overmind.rects.AreaUtils.byThreePoints(a, d, point));
return (... |
public java.lang.Integer removeTask(application.Command cmd) {
searchList.clear();
searchTasksForMatches(cmd);
switch (searchList.size()) {
case 0 :
return application.DataManager.TASK_NOT_FOUND;
case 1 :
taskList.remove(searchList.get(0));
file.clear();
... | public java.lang.Integer removeTask(application.Command cmd) {
searchList.clear();
searchTasksForMatches(cmd);
switch (searchList.size()) {
case 0 :
return application.DataManager.TASK_NOT_FOUND;
case 1 :
taskList.remove(searchList.get(0));
file.clear();
... |
protected void onLaunch() {
configureRemoteListeners(server);
menu.addItem("Morpion");
menu.addItem("Ecriture");
menu.addItem("Dessin");
menu.addItem("Enregistrer");
menu.addItem("Quitter");
menu.setAppName("Partage");
menu.setDistantUID(this.distantUID);
inputScreen.restart(apps.Pac... | protected void onLaunch() {
configureRemoteListeners(server);
menu.addItem("Morpion");
menu.addItem("Ecriture");
menu.addItem("Dessin");
menu.addItem("Enregistrer");
menu.setAppName("Partage");
menu.setDistantUID(this.distantUID);
inputScreen.restart(apps.Pactivity, server);
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
android.preference.PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
mSortOrder = com.odytrice.popularmovies.utils.PreferenceUtils.getSortOrder(this);
if ((findViewById(R.id.movie_detail... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
android.preference.PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
mSortOrder = com.odytrice.popularmovies.utils.PreferenceUtils.getSortOrder(this);
if ((findViewById(R.id.movie_detail... |
public static java.io.File joinFiles(javax.swing.JFrame parent, java.io.File[] inputFileArray, java.lang.Integer minNumberSamples) {
java.io.File file = org.fhaes.tools.FHOperations.getOutputFile(parent, new org.fhaes.filefilter.FHXFileFilter(), false);
if (file != null) {
new org.fhaes.tools.FHOperatio... | public static java.io.File joinFiles(javax.swing.JFrame parent, java.io.File[] inputFileArray, java.lang.Integer minNumberSamples) {
java.io.File file = org.fhaes.tools.FHOperations.getOutputFile(parent, new org.fhaes.filefilter.FHXFileFilter(), false);
if (file != null) {
new org.fhaes.tools.FHOperatio... |
public java.util.ArrayList<bl.orderbl.OrderVO> searchHotelOrder(bl.orderbl.OrderState os, java.lang.String keyword) {
blservice.userblservice.UserBLInfo userBLInfo = new bl.blfactory.BLFactoryImpl().getUserBLInfo();
userBLInfo = new blservice.userblservice.UserBLService_Stub();
java.lang.String staffID = us... | public java.util.ArrayList<bl.orderbl.OrderVO> searchHotelOrder(bl.orderbl.OrderState os, java.lang.String keyword) {
blservice.userblservice.UserBLInfo userBLInfo = new bl.blfactory.BLFactoryImpl().getUserBLInfo();
java.lang.String staffID = userBLInfo.getCurrentID();
java.lang.String hotelID = userBLInfo.... |
public void onClick(android.content.DialogInterface dialog, int id) {
android.net.ConnectivityManager connectivityManager = ((android.net.ConnectivityManager) (this.getSystemService(Context.CONNECTIVITY_SERVICE)));
android.net.NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
if (!((netw... | public void onClick(android.content.DialogInterface dialog, int id) {
android.net.ConnectivityManager connectivityManager = ((android.net.ConnectivityManager) (this.getSystemService(Context.CONNECTIVITY_SERVICE)));
android.net.NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
if (!((netw... |
public final java.util.List<com.github.sdnwiselab.sdnwise.util.NodeAddress> getNodeAliases(final byte net, final com.github.sdnwiselab.sdnwise.util.NodeAddress dst) {
java.util.List<com.github.sdnwiselab.sdnwise.util.NodeAddress> list = new java.util.LinkedList<>();
com.github.sdnwiselab.sdnwise.util.NodeAddres... | public final java.util.List<com.github.sdnwiselab.sdnwise.util.NodeAddress> getNodeAliases(final byte net, final com.github.sdnwiselab.sdnwise.util.NodeAddress dst) {
java.util.List<com.github.sdnwiselab.sdnwise.util.NodeAddress> list = new java.util.LinkedList<>();
com.github.sdnwiselab.sdnwise.util.NodeAddres... |
public java.util.List<java.lang.Double> diffOfLists(java.util.List<java.lang.Double> xList, java.util.List<java.lang.Double> yList) {
java.util.List<java.lang.Double> resList = new java.util.ArrayList<java.lang.Double>();
int size = xList.size();
for (int i = 0; i < size; i++) {
resList.set(i, ((xLi... | public java.util.List<java.lang.Double> diffOfLists(java.util.List<java.lang.Double> xList, java.util.List<java.lang.Double> yList) {
java.util.List<java.lang.Double> resList = new java.util.ArrayList<java.lang.Double>();
int size = xList.size();
for (int i = 0; i < size; i++) {
resList.add(i, ((xLi... |
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException {
super.init(config);
mealRestController = new ru.javawebinar.topjava.web.meal.MealRestController();
try (org.springframework.context.ConfigurableApplicationContext appCtx = new org.springframework.context.support.Cla... | public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException {
super.init(config);
try (org.springframework.context.ConfigurableApplicationContext appCtx = new org.springframework.context.support.ClassPathXmlApplicationContext("spring/spring-app.xml")) {
java.lang.System.ou... |
private boolean isComponentEnabled(net.opengis.swe.v20.DataComponent component) {
java.lang.String defUri = component.getDefinition();
if (((enabledDefUris) != null) && (defUri != null)) {
if (!(enabledDefUris.contains(defUri)))
return false;
}
return true;
} | private boolean isComponentEnabled(net.opengis.swe.v20.DataComponent component) {
java.lang.String defUri = component.getDefinition();
if (defUri == null)
return false;
if ((enabledDefUris) != null) {
if (!(enabledDefUris.contains(defUri)))
return false;
}
r... |
public void send(java.util.List<java.lang.String> recipients, java.lang.String subject, java.util.HashMap<java.lang.Integer, org.safs.tools.mail.Mailer.MimeContent> contents, java.util.HashMap<java.lang.String, java.lang.String> attchments_alias) throws org.safs.SAFSException {
java.util.HashMap<javax.mail.Message.... | public void send(java.util.List<java.lang.String> recipients, java.lang.String subject, java.util.Map<java.lang.Integer, org.safs.tools.mail.Mailer.MimeContent> contents, java.util.Map<java.lang.String, java.lang.String> attchments_alias) throws org.safs.SAFSException {
java.util.Map<javax.mail.Message.RecipientTyp... |
public void finish() {
startFunction = null;
updateFunction = null;
finishFunction = null;
beginCollisionFunction = null;
endCollisionFunction = null;
org.mozilla.javascript.Context context = org.mozilla.javascript.Context.enter();
context.setOptimizationLevel((-1));
try {
if ((f... | public void finish() {
startFunction = null;
updateFunction = null;
finishFunction = null;
beginCollisionFunction = null;
endCollisionFunction = null;
org.mozilla.javascript.Context context = org.mozilla.javascript.Context.enter();
context.setOptimizationLevel((-1));
try {
if ((f... |
public void collect(int doc) throws java.io.IOException {
topRowUpstream.throwIfKilled();
checkCircuitBreaker();
(rowCount)++;
if (((rowCount) % (io.crate.operation.collect.collectors.CrateDocCollector.LuceneDocCollector.KEEP_ALIVE_AFTER_ROWS)) == 0) {
keepAliveListener.keepAlive();
}
fo... | public void collect(int doc) throws java.io.IOException {
topRowUpstream.throwIfKilled();
checkCircuitBreaker();
(rowCount)++;
if (((rowCount) % (io.crate.operation.collect.collectors.CrateDocCollector.LuceneDocCollector.KEEP_ALIVE_AFTER_ROWS)) == 0) {
keepAliveListener.keepAlive();
}
fo... |
public static android.database.sqlite.SQLiteDatabase createStage(android.database.sqlite.SQLiteDatabase db, int rows, int cols, boolean isLocked, long level, java.lang.String jsonStartGridSerialized) {
db.insert(Stage.TABLE_NAME, null, new com.captainhampton.android.lightsout.model.Stage.Marshal().num_cols(cols).nu... | public static android.database.sqlite.SQLiteDatabase createStage(android.database.sqlite.SQLiteDatabase db, int rows, int cols, boolean isLocked, long level, java.lang.String jsonStartGridSerialized) {
db.insert(Stage.TABLE_NAME, null, new com.captainhampton.android.lightsout.model.Stage.Marshal().num_cols(cols).nu... |
public org.atlasapi.media.entity.Priority getPriority(com.mongodb.DBObject dbObject) {
java.lang.Double score = com.metabroadcast.common.persistence.translator.TranslatorUtils.toDouble(dbObject, org.atlasapi.persistence.media.entity.PriorityTranslator.SCORE_KEY);
java.util.List<java.lang.String> priorityScoreRe... | public org.atlasapi.media.entity.Priority getPriority(com.mongodb.DBObject dbObject) {
java.lang.Double score = null;
java.util.List<java.lang.String> priorityScoreReasons = null;
if (dbObject.containsField(org.atlasapi.persistence.media.entity.PriorityTranslator.SCORE_KEY)) {
score = com.metabroadc... |
private static void setPrevInsertion(org.zkoss.zk.ui.Component target, org.zkoss.zk.ui.Component prevInsertion) {
if (target instanceof org.zkoss.zk.ui.HtmlShadowElement) {
org.zkoss.zk.ui.HtmlShadowElement.asShadow(target)._previousInsertion = prevInsertion;
}
if (prevInsertion instanceof org.zkoss... | private static void setPrevInsertion(org.zkoss.zk.ui.Component target, org.zkoss.zk.ui.Component prevInsertion) {
if (target == prevInsertion)
return ;
if (target instanceof org.zkoss.zk.ui.HtmlShadowElement) {
org.zkoss.zk.ui.HtmlShadowElement.asShadow(target)._previousInsertion = prevInse... |
public void setMacros(int fat, int carbs, int protein) {
this.fat = ((calories) / fat) * 100;
this.carbs = ((calories) / carbs) * 100;
this.protein = ((calories) / protein) * 100;
} | public void setMacros(int fat, int carbs, int protein) {
this.fat = ((calories) * fat) / 100;
this.carbs = ((calories) * carbs) / 100;
this.protein = ((calories) * protein) / 100;
} |
public void actionPerformed(java.awt.event.ActionEvent e) {
java.lang.String newMeaning = meaningsInput.getText();
if (!(newMeaning.equals(""))) {
parent.getWordManager().addMeaning(currentWord, newMeaning);
if ((strength) == (-1))
parent.notifyStrengthChange(currentWord, 0);
... | public void actionPerformed(java.awt.event.ActionEvent e) {
java.lang.String newMeaning = meaningsInput.getText().trim();
if (!(newMeaning.equals(""))) {
parent.getWordManager().addMeaning(currentWord, newMeaning);
if ((strength) == (-1))
parent.notifyStrengthChange(currentWord, 0);
... |
public android.support.v4.app.Fragment getItem(int position) {
switch (position) {
case 0 :
com.pommerening.quinn.foodtruck.fragment.tabs.employee.EmployeeItemsFragment invTab = com.pommerening.quinn.foodtruck.fragment.tabs.employee.EmployeeItemsFragment.newInstance(mUsername);
retur... | public android.support.v4.app.Fragment getItem(int position) {
switch (position) {
case 0 :
com.pommerening.quinn.foodtruck.fragment.tabs.employee.EmployeeItemsFragment invTab = com.pommerening.quinn.foodtruck.fragment.tabs.employee.EmployeeItemsFragment.newInstance(mUsername);
retur... |
public void testIsConstantFunction() {
assertEquals(false, storm.autoscale.scheduler.RegressionSelectorTest.regressionLinear.isConstantFunction());
assertEquals(false, storm.autoscale.scheduler.RegressionSelectorTest.regressionExponential.isConstantFunction());
assertEquals(false, storm.autoscale.scheduler.... | public void testIsConstantFunction() {
assertEquals(false, storm.autoscale.scheduler.RegressionSelectorTest.regressionLinear.isConstantFunction());
assertEquals(false, storm.autoscale.scheduler.RegressionSelectorTest.regressionExponential.isConstantFunction());
assertEquals(false, storm.autoscale.scheduler.... |
public boolean addBook(java.lang.String title, java.lang.String author, int price) throws by.tr.library.service.exception.ServiceException {
boolean result = false;
by.tr.library.bean.Book book = new by.tr.library.bean.Book();
book.setAuthor(author);
book.setTitle(title);
book.setPrice(price);
b... | public boolean addBook(by.tr.library.bean.Book book) throws by.tr.library.service.exception.ServiceException {
boolean result = false;
by.tr.library.dao.DAOFactory factory = by.tr.library.dao.DAOFactory.getInstance();
by.tr.library.dao.AdminDao adminDao = factory.getFileAdminDao();
try {
result ... |
public space.ship.Loc getLocAt(java.awt.Point point) {
int x = (((point.x) - (offset.x)) - (origin.y)) / (pixsToGrid);
int y = (((point.y) - (offset.y)) - (origin.y)) / (pixsToGrid);
if (space.ship.Loc.isValid(x, y))
return space.ship.Loc.make(x, y);
return null;
} | public space.ship.Loc getLocAt(java.awt.Point point) {
int x = (((point.x) - (offset.x)) - (origin.x)) / (pixsToGrid);
int y = (((point.y) - (offset.y)) - (origin.y)) / (pixsToGrid);
if (space.ship.Loc.isValid(x, y))
return space.ship.Loc.make(x, y);
return null;
} |
public void setNoPurgePlayers(java.util.List<java.lang.String> no_pp) {
no_pp.forEach(( name) -> {
java.util.UUID uuid = com.alternacraft.pvptitles.Libraries.UUIDFetcher.getUUIDPlayer(name);
if (!(this.noPurgePlayers.contains(uuid.toString())))
this.noPurgePlayers.add(uuid.toString());
... | public void setNoPurgePlayers(java.util.List<java.lang.String> no_pp) {
no_pp.forEach(( name) -> {
java.util.UUID uuid = com.alternacraft.pvptitles.Libraries.UUIDFetcher.getUUIDPlayer(name);
if ((uuid != null) && (!(this.noPurgePlayers.contains(uuid.toString()))))
this.noPurgePlayers.add... |
public void onTimeSet(com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment dialog, int hourOfDay, int minute) {
if (isTimeValid(event, hourOfDay, minute)) {
event.setDate(getDateFromTimePicker(hourOfDay, minute));
timeButton.setText(event.getStringTime());
}else {
... | public void onTimeSet(com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment dialog, int hourOfDay, int minute) {
if (isTimeValid(event, hourOfDay, minute)) {
event.setDate(getDateFromTimePicker(event, hourOfDay, minute));
timeButton.setText(event.getStringTime());
}else ... |
public void write(dev.wolveringer.packet.PacketDataSerializer s) {
if ((channel) != null)
s.writeString(channel);
try {
data.readerIndex(0);
int length = data.readableBytes();
s.ensureWritable(length, true);
java.lang.System.out.println(((("in - Buffer: " + (data)) +... | public void write(dev.wolveringer.packet.PacketDataSerializer s) {
if ((channel) != null)
s.writeString(channel);
try {
data.readerIndex(0);
int length = data.readableBytes();
s.ensureWritable(length, true);
s.writeBytes(data, length);
data.release();
} c... |
public boolean isReferable() {
if ((this.getPrimaryKeySize()) > 0) {
return true;
}
if ((this.compoundUniqueKeyList.size()) > 0) {
return true;
}
for (final org.dbflute.erflute.editor.model.diagram_contents.element.node.table.column.ERColumn column : this.columns) {
if (colum... | public boolean isReferable() {
if ((getPrimaryKeySize()) > 0) {
return true;
}
if ((compoundUniqueKeyList.size()) > 0) {
return true;
}
for (final org.dbflute.erflute.editor.model.diagram_contents.element.node.table.column.ERColumn column : columns) {
if (column instanceof or... |
public boolean isFileAccessRequestMultiButtonRequired() {
if (!(isSessionUserAuthenticated())) {
return false;
}
if (!(workingVersion.getTermsOfUseAndAccess().isFileAccessRequest())) {
}
for (edu.harvard.iq.dataverse.FileMetadata fmd : workingVersion.getFileMetadatas()) {
if (!(canDo... | public boolean isFileAccessRequestMultiButtonRequired() {
if (!(isSessionUserAuthenticated())) {
return false;
}
if ((workingVersion) == null) {
return false;
}
if (!(workingVersion.getTermsOfUseAndAccess().isFileAccessRequest())) {
}
for (edu.harvard.iq.dataverse.FileMetadat... |
private void stx(short x, short address, short indirect) {
short EA = calcEA(((short) (0)), address, indirect);
mar = EA;
mbr = this.x[x];
cpu.CPU.setMem(mbr, mar);
} | private void stx(short x, short address, short indirect) {
short EA = calcEA(((short) (0)), address, indirect);
mar = EA;
mbr = this.x[x];
setMem(mbr, mar);
} |
public java.util.Map<java.lang.String, java.lang.Double> computeWeights() {
java.util.List<java.lang.String> vocabularies = categoryDataset.getListOfWords();
for (java.lang.String word : vocabularies) {
weights.put(word, computeTFIDF(word));
java.lang.System.out.println(((word + ":") + (weights.... | public java.util.Map<java.lang.String, java.lang.Double> computeWeights() {
java.util.List<java.lang.String> vocabularies = categoryDataset.getListOfWords();
java.lang.System.out.println(vocabularies.size());
for (java.lang.String word : vocabularies) {
weights.put(word, computeTFIDF(word));
... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View view = inflater.inflate(R.layout.maps, container, false);
com.google.android.gms.maps.SupportMapFragment mapFragment = ((com.google.android.gms.... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
com.google.android.gms.maps.SupportMapFragment mapFragment = ((com.google.android.gms.maps.SupportMapFragment) (getChildFragmentManager().findFragmentById(R.id.map)))... |
private void closeAndWaitForRecovery(com.rabbitmq.client.impl.recovery.AutorecoveringConnection connection) throws java.io.IOException, java.lang.InterruptedException {
final java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch(1);
connection.addRecoveryListener(new com.rabbitmq.c... | private void closeAndWaitForRecovery(com.rabbitmq.client.impl.recovery.AutorecoveringConnection connection) throws java.io.IOException, java.lang.InterruptedException {
final java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch(1);
connection.addRecoveryListener(new com.rabbitmq.c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.