id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
43,901 | else if (element.getAttributeValue(SEPERATOR) != null) {
myComponent = Separator.getInstance();
}
else if (element.getAttributeValue(IS_GROUP) != null) {
final AnAction action = ActionManager.getInstance().getAction(attributeValue);
<BUG>myComponent = new Group(action != null ? action.getTemplatePresentation().getText() : attributeValue, attributeValue, null, null);
}</BUG>
myActionType = Integer.parseInt(element.getAttributeValue(ACTION_TYPE));
myAbsolutePosition = Integer.parseInt(element.getAttributeValue(POSITION));
DefaultJDOMExternalizer.readExternal(this, element);
| myComponent = action != null ? ActionsTreeUtil.createGroup((ActionGroup)action, true) : new Group(attributeValue, attributeValue, null, null);
|
43,902 | chart.addYAxisLabels(AxisLabelsFactory.newAxisLabels(labels));
chart.addXAxisLabels(AxisLabelsFactory.newNumericRangeAxisLabels(0, max));
chart.setBarWidth(BarChart.AUTO_RESIZE);
chart.setSize(600, 500);
chart.setHorizontal(true);
<BUG>chart.setTitle("Total Evaluations by User");
showChartImg(resp, chart.toURLString());
}</BUG>
private List<Entry<String, Integer>> sortEntries(Collection<Entry<String, Integer>> entries) {
List<Entry<String, Integer>> result = new ArrayList<Entry<String, Integer>>(entries);
| chart.setDataEncoding(DataEncoding.TEXT);
return chart;
}
|
43,903 | checkEvaluationsEqual(eval4, foundissueProto.getEvaluations(0));
checkEvaluationsEqual(eval5, foundissueProto.getEvaluations(1));
}
public void testGetRecentEvaluationsNoneFound() throws Exception {
DbIssue issue = createDbIssue("fad", persistenceHelper);
<BUG>DbEvaluation eval1 = createEvaluation(issue, "someone", 100);
DbEvaluation eval2 = createEvaluation(issue, "someone", 200);
DbEvaluation eval3 = createEvaluation(issue, "someone", 300);
issue.addEvaluations(eval1, eval2, eval3);</BUG>
getPersistenceManager().makePersistent(issue);
| [DELETED] |
43,904 | public int read() throws IOException {
return inputStream.read();
}
});
}
<BUG>}
protected DbEvaluation createEvaluation(DbIssue issue, String who, long when) {</BUG>
DbUser user;
Query query = getPersistenceManager().newQuery("select from " + persistenceHelper.getDbUserClass().getName()
+ " where openid == :myopenid");
| @SuppressWarnings({"unchecked"})
protected DbEvaluation createEvaluation(DbIssue issue, String who, long when) {
|
43,905 | eval.setComment("my comment");
eval.setDesignation("MUST_FIX");
eval.setIssue(issue);
eval.setWhen(when);
eval.setWho(user.createKeyObject());
<BUG>eval.setEmail(who);
return eval;</BUG>
}
protected PersistenceManager getPersistenceManager() {
return testHelper.getPersistenceManager();
| issue.addEvaluation(eval);
return eval;
|
43,906 | public ReportElement getBase() {
return base;
}
@Override
public float print(PDDocument document, PDPageContentStream stream, int pageNumber, float startX, float startY, float allowedWidth) throws IOException {
<BUG>PDPage currPage = (PDPage) document.getDocumentCatalog().getPages().get(pageNo);
PDPageContentStream pageStream = new PDPageContentStream(document, currPage, true, false);
</BUG>
base.print(document, pageStream, pageNo, x, y, width);
pageStream.close();
| PDPage currPage = document.getDocumentCatalog().getPages().get(pageNo);
PDPageContentStream pageStream = new PDPageContentStream(document, currPage, PDPageContentStream.AppendMode.APPEND, false);
|
43,907 | public PdfTextStyle(String config) {
Assert.hasText(config);
String[] split = config.split(",");
Assert.isTrue(split.length == 3, "config must look like: 10,Times-Roman,#000000");
fontSize = Integer.parseInt(split[0]);
<BUG>font = resolveStandard14Name(split[1]);
color = new Color(Integer.valueOf(split[2].substring(1), 16));</BUG>
}
public int getFontSize() {
return fontSize;
| font = getFont(split[1]);
color = new Color(Integer.valueOf(split[2].substring(1), 16));
|
43,908 | package cc.catalysts.boot.report.pdf.elements;
import cc.catalysts.boot.report.pdf.config.PdfTextStyle;
import cc.catalysts.boot.report.pdf.utils.ReportAlignType;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
<BUG>import org.apache.pdfbox.pdmodel.font.PDFont;
import org.slf4j.Logger;</BUG>
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
import java.io.IOException;
| import org.apache.pdfbox.pdmodel.font.PDType1Font;
import org.apache.pdfbox.util.Matrix;
import org.slf4j.Logger;
|
43,909 | addTextSimple(stream, textConfig, textX, nextLineY, "");
return nextLineY;
}
try {
<BUG>String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, fixedText);
</BUG>
float x = calculateAlignPosition(textX, align, textConfig, allowedWidth, split[0]);
if (!underline) {
addTextSimple(stream, textConfig, x, nextLineY, split[0]);
} else {
| String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, text);
|
43,910 | public static void addTextSimple(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) {
try {
stream.setFont(textConfig.getFont(), textConfig.getFontSize());
stream.setNonStrokingColor(textConfig.getColor());
stream.beginText();
<BUG>stream.newLineAtOffset(textX, textY);
stream.showText(text);</BUG>
} catch (Exception e) {
LOG.warn("Could not add text: " + e.getClass() + " - " + e.getMessage());
}
| stream.setTextMatrix(new Matrix(1,0,0,1, textX, textY));
stream.showText(text);
|
43,911 | public static void addTextSimpleUnderlined(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) {
addTextSimple(stream, textConfig, textX, textY, text);
try {
float lineOffset = textConfig.getFontSize() / 8F;
stream.setStrokingColor(textConfig.getColor());
<BUG>stream.setLineWidth(0.5F);
stream.drawLine(textX, textY - lineOffset, textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
</BUG>
stream.stroke();
} catch (IOException e) {
| stream.moveTo(textX, textY - lineOffset);
stream.lineTo(textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
|
43,912 | list.add(text.length());
return list;
}
public static String[] splitText(PDFont font, int fontSize, float allowedWidth, String text) {
String endPart = "";
<BUG>String shortenedText = text;
List<String> breakSplitted = Arrays.asList(shortenedText.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());
if (breakSplitted.size() > 1) {</BUG>
String[] splittedFirst = splitText(font, fontSize, allowedWidth, breakSplitted.get(0));
StringBuilder remaining = new StringBuilder(splittedFirst[1] == null ? "" : splittedFirst[1] + "\n");
| List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());
if (breakSplitted.size() > 1) {
|
43,913 | package cc.catalysts.boot.report.pdf.elements;
import org.apache.pdfbox.pdmodel.PDDocument;
<BUG>import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
import java.io.IOException;</BUG>
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
| import org.apache.pdfbox.pdmodel.PDPageContentStream;
import java.io.IOException;
|
43,914 | PollsChoice.class, choiceActionableDynamicQuery.performCount());
ActionableDynamicQuery questionActionableDynamicQuery =
new PollsQuestionExportActionableDynamicQuery(portletDataContext);
manifestSummary.addModelCount(
PollsQuestion.class, questionActionableDynamicQuery.performCount());
<BUG>if (portletDataContext.getBooleanParameter(
PollsPortletDataHandler.NAMESPACE, "votes")) {</BUG>
ActionableDynamicQuery voteActionableDynamicQuery =
new PollsVoteExportActionableDynamicQuery(portletDataContext);
manifestSummary.addModelCount(
| [DELETED] |
43,915 | articleActionableDynamicQuery.performCount());
</BUG>
ActionableDynamicQuery folderActionableDynamicQuery =
getFolderActionableDynamicQuery(portletDataContext);
manifestSummary.addModelCount(
<BUG>JournalFolder.class,
folderActionableDynamicQuery.performCount());
}</BUG>
}
| portletDataContext.getManifestSummary();
ActionableDynamicQuery feedActionableDynamicQuery =
new JournalFeedExportActionableDynamicQuery(portletDataContext);
JournalFeed.class, feedActionableDynamicQuery.performCount());
ActionableDynamicQuery articleActionableDynamicQuery =
getArticleActionableDynamicQuery(portletDataContext);
JournalArticle.class, articleActionableDynamicQuery.performCount());
JournalFolder.class, folderActionableDynamicQuery.performCount());
|
43,916 |
portletDataContext);</BUG>
manifestSummary.addModelCount(
MBThreadFlag.class,
threadFlagsActionableDynamicQuery.performCount());
<BUG>}
if (portletDataContext.getBooleanParameter(NAMESPACE, "user-bans")) {</BUG>
ActionableDynamicQuery userBansActionableDynamicQuery =
new MBBanExportActionableDynamicQuery(portletDataContext);
manifestSummary.addModelCount(
| MBCategory.class, categoriesActionableDynamicQuery.performCount());
ActionableDynamicQuery messagesActionableDynamicQuery =
new MBMessageExportActionableDynamicQuery(portletDataContext);
MBMessage.class, messagesActionableDynamicQuery.performCount());
ActionableDynamicQuery threadFlagsActionableDynamicQuery =
new MBThreadFlagExportActionableDynamicQuery(portletDataContext);
|
43,917 | import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
<BUG>import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;</BUG>
import java.io.File;
import java.io.StringReader;
import java.net.URI;
| import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.Response;
|
43,918 | import java.net.URI;
import java.util.Arrays;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE;
import static org.agoncal.application.conference.commons.domain.Links.COLLECTION;
import static org.agoncal.application.conference.commons.domain.Links.SELF;
<BUG>import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;</BUG>
@RunWith(Arquillian.class)
@RunAsClient
public class TalkEndpointTest {
| import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
|
43,919 | JsonObject jsonObject = readJsonContent(response);
assertEquals("Should have 5 links", 5, jsonObject.getJsonObject("links").size());
assertEquals("Should have 1 talk", 1, jsonObject.getJsonArray("data").size());
}
@Test
<BUG>@InSequence(7)
</BUG>
public void shouldRemoveTalk() throws Exception {
Response response = webTarget.path(talkId).request(APPLICATION_JSON_TYPE).delete();
assertEquals(204, response.getStatus());
| @InSequence(8)
|
43,920 | assertEquals(204, response.getStatus());
Response checkResponse = webTarget.path(talkId).request(APPLICATION_JSON_TYPE).get();
assertEquals(404, checkResponse.getStatus());
}
@Test
<BUG>@InSequence(8)
</BUG>
public void shouldRemoveWithInvalidInput() throws Exception {
Response response = webTarget.request(APPLICATION_JSON_TYPE).delete();
assertEquals(405, response.getStatus());
| @InSequence(9)
|
43,921 | import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
<BUG>import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;</BUG>
import java.io.File;
import java.io.StringReader;
import java.net.URI;
| import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.Response;
|
43,922 | import java.io.StringReader;
import java.net.URI;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE;
import static org.agoncal.application.conference.commons.domain.Links.COLLECTION;
import static org.agoncal.application.conference.commons.domain.Links.SELF;
<BUG>import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;</BUG>
@RunWith(Arquillian.class)
@RunAsClient
public class SessionEndpointTest {
| import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
|
43,923 | JsonObject jsonObject = readJsonContent(response);
assertEquals("Should have 10 links", 10, jsonObject.getJsonObject("links").size());
assertEquals("Should have 1 talk", 1, jsonObject.getJsonArray("data").size());
}
@Test
<BUG>@InSequence(7)
</BUG>
public void shouldRemoveSession() throws Exception {
Response response = webTarget.path(sessionId).request(APPLICATION_JSON_TYPE).delete();
assertEquals(204, response.getStatus());
| @InSequence(8)
|
43,924 | assertEquals(204, response.getStatus());
Response checkResponse = webTarget.path(sessionId).request(APPLICATION_JSON_TYPE).get();
assertEquals(404, checkResponse.getStatus());
}
@Test
<BUG>@InSequence(8)
</BUG>
public void shouldRemoveWithInvalidInput() throws Exception {
Response response = webTarget.request(APPLICATION_JSON_TYPE).delete();
assertEquals(405, response.getStatus());
| @InSequence(9)
|
43,925 | import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
<BUG>import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;</BUG>
import java.io.File;
import java.io.StringReader;
import java.net.URI;
| import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.Response;
|
43,926 | import java.io.File;
import java.io.StringReader;
import java.net.URI;
import java.util.Arrays;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE;
<BUG>import static org.agoncal.application.conference.commons.domain.Links.COLLECTION;
import static org.agoncal.application.conference.commons.domain.Links.SELF;
import static org.agoncal.application.conference.commons.domain.Links.SUMMARY;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;</BUG>
@RunWith(Arquillian.class)
| import static org.agoncal.application.conference.commons.domain.Links.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
|
43,927 | JsonObject jsonObject = readJsonContent(response);
assertEquals("Should have 5 links", 5, jsonObject.getJsonObject("links").size());
assertEquals("Should have 1 talk", 1, jsonObject.getJsonArray("data").size());
}
@Test
<BUG>@InSequence(7)
</BUG>
public void shouldRemoveSpeaker() throws Exception {
Response response = webTarget.path(speakerId).request(APPLICATION_JSON_TYPE).delete();
assertEquals(204, response.getStatus());
| @InSequence(8)
|
43,928 | assertEquals(204, response.getStatus());
Response checkResponse = webTarget.path(speakerId).request(APPLICATION_JSON_TYPE).get();
assertEquals(404, checkResponse.getStatus());
}
@Test
<BUG>@InSequence(8)
</BUG>
public void shouldRemoveWithInvalidInput() throws Exception {
Response response = webTarget.request(APPLICATION_JSON_TYPE).delete();
assertEquals(405, response.getStatus());
| @InSequence(9)
|
43,929 | import javax.json.JsonReader;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
<BUG>import javax.ws.rs.core.Form;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;</BUG>
import java.io.File;
| import javax.ws.rs.core.*;
|
43,930 | assertEquals(baseURL.toString().concat("api/attendees/login"), Jwts.parser().setSigningKey(key).parseClaimsJws(justTheToken).getBody().getIssuer());
assertNotNull(Jwts.parser().setSigningKey(key).parseClaimsJws(justTheToken).getBody().getIssuedAt());
assertNotNull(Jwts.parser().setSigningKey(key).parseClaimsJws(justTheToken).getBody().getExpiration());
}
@Test
<BUG>@InSequence(9)
</BUG>
public void shouldCheckCollectionOfAttendees() throws Exception {
Response response = webTarget.request(APPLICATION_JSON_TYPE).get();
assertEquals(200, response.getStatus());
| @InSequence(10)
|
43,931 | JsonObject jsonObject = readJsonContent(response);
assertEquals("Should have 5 links", 5, jsonObject.getJsonObject("links").size());
assertEquals("Should have 1 talk", 1, jsonObject.getJsonArray("data").size());
}
@Test
<BUG>@InSequence(10)
</BUG>
public void shouldRemoveAttendee() throws Exception {
Response response = webTarget.path(attendeeId).request(APPLICATION_JSON_TYPE).delete();
assertEquals(204, response.getStatus());
| @InSequence(11)
|
43,932 | assertEquals(204, response.getStatus());
Response checkResponse = webTarget.path(attendeeId).request(APPLICATION_JSON_TYPE).get();
assertEquals(404, checkResponse.getStatus());
}
@Test
<BUG>@InSequence(11)
</BUG>
public void shouldRemoveWithInvalidInput() throws Exception {
Response response = webTarget.request(APPLICATION_JSON_TYPE).delete();
assertEquals(405, response.getStatus());
| @InSequence(12)
|
43,933 | timeWarp = new OwnLabel(getFormattedTimeWrap(), skin, "warp");
timeWarp.setName("time warp");
Container wrapWrapper = new Container(timeWarp);
wrapWrapper.width(60f * GlobalConf.SCALE_FACTOR);
wrapWrapper.align(Align.center);
<BUG>VerticalGroup timeGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
</BUG>
HorizontalGroup dateGroup = new HorizontalGroup();
dateGroup.space(4 * GlobalConf.SCALE_FACTOR);
dateGroup.addActor(date);
| VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
|
43,934 | focusListScrollPane.setFadeScrollBars(false);
focusListScrollPane.setScrollingDisabled(true, false);
focusListScrollPane.setHeight(tree ? 200 * GlobalConf.SCALE_FACTOR : 100 * GlobalConf.SCALE_FACTOR);
focusListScrollPane.setWidth(160);
}
<BUG>VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
</BUG>
objectsGroup.addActor(searchBox);
if (focusListScrollPane != null) {
objectsGroup.addActor(focusListScrollPane);
| VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
|
43,935 | headerGroup.addActor(expandIcon);
headerGroup.addActor(detachIcon);
addActor(headerGroup);
expandIcon.setChecked(expanded);
}
<BUG>public void expand() {
</BUG>
if (!expandIcon.isChecked()) {
expandIcon.setChecked(true);
}
| public void expandPane() {
|
43,936 | </BUG>
if (!expandIcon.isChecked()) {
expandIcon.setChecked(true);
}
}
<BUG>public void collapse() {
</BUG>
if (expandIcon.isChecked()) {
expandIcon.setChecked(false);
}
| headerGroup.addActor(expandIcon);
headerGroup.addActor(detachIcon);
addActor(headerGroup);
expandIcon.setChecked(expanded);
public void expandPane() {
public void collapsePane() {
|
43,937 | });
playstop.addListener(new TextTooltip(txt("gui.tooltip.playstop"), skin));
TimeComponent timeComponent = new TimeComponent(skin, ui);
timeComponent.initialize();
CollapsiblePane time = new CollapsiblePane(ui, txt("gui.time"), timeComponent.getActor(), skin, true, playstop);
<BUG>time.align(Align.left);
mainActors.add(time);</BUG>
panes.put(timeComponent.getClass().getSimpleName(), time);
if (Constants.desktop) {
recCamera = new OwnImageButton(skin, "rec");
| time.align(Align.left).columnAlign(Align.left);
mainActors.add(time);
|
43,938 | panes.put(visualEffectsComponent.getClass().getSimpleName(), visualEffects);
ObjectsComponent objectsComponent = new ObjectsComponent(skin, ui);
objectsComponent.setSceneGraph(sg);
objectsComponent.initialize();
CollapsiblePane objects = new CollapsiblePane(ui, txt("gui.objects"), objectsComponent.getActor(), skin, false);
<BUG>objects.align(Align.left);
mainActors.add(objects);</BUG>
panes.put(objectsComponent.getClass().getSimpleName(), objects);
GaiaComponent gaiaComponent = new GaiaComponent(skin, ui);
gaiaComponent.initialize();
| objects.align(Align.left).columnAlign(Align.left);
mainActors.add(objects);
|
43,939 | if (Constants.desktop) {
MusicComponent musicComponent = new MusicComponent(skin, ui);
musicComponent.initialize();
Actor[] musicActors = MusicActorsManager.getMusicActors() != null ? MusicActorsManager.getMusicActors().getActors(skin) : null;
CollapsiblePane music = new CollapsiblePane(ui, txt("gui.music"), musicComponent.getActor(), skin, true, musicActors);
<BUG>music.align(Align.left);
mainActors.add(music);</BUG>
panes.put(musicComponent.getClass().getSimpleName(), music);
}
Button switchWebgl = new OwnTextButton(txt("gui.webgl.back"), skin, "link");
| music.align(Align.left).columnAlign(Align.left);
mainActors.add(music);
|
43,940 | import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTextField;
<BUG>import org.typetalk.Messages;
import org.typetalk.speech.SoundEffect;</BUG>
import org.typetalk.speech.Voice;
import com.jgoodies.forms.factories.FormFactory;
import com.jgoodies.forms.layout.CellConstraints;
| import org.typetalk.speech.Language;
import org.typetalk.speech.SoundEffect;
|
43,941 | import raging.goblin.swingutils.DoubleSlider;
import raging.goblin.swingutils.Icon;
import raging.goblin.swingutils.ScreenPositioner;
import raging.goblin.swingutils.StringSeparator;
public class VoiceConfigurationDialog extends JDialog {
<BUG>private static final Messages MESSAGES = Messages.getInstance();
private JComboBox<Voice> voicesBox;</BUG>
private List<EffectPanel> effectPanels = new ArrayList<>();
@Getter
private boolean okPressed;
| private JComboBox<Language> languagesBox;
private JComboBox<Voice> voicesBox;
|
43,942 | JButton previewButton = new JButton(Icon.getIcon("/icons/control_play.png"));
previewButton.addActionListener(a -> {
try {
LocalMaryInterface marytts = new LocalMaryInterface();
marytts.setVoice(((Voice) voicesBox.getSelectedItem()).getName());
<BUG>String effectsString = effectPanels.stream().filter(ep -> ep.isEnabled()).map(ep -> ep.getEffectString())
.collect(Collectors.joining("+"));</BUG>
marytts.setAudioEffects(effectsString);
AudioInputStream audio = marytts.generateAudio(previewField.getText().toLowerCase());
AudioPlayer player = new AudioPlayer(audio);
| String effectsString = effectPanels
.stream()
.filter(ep -> ep.isEnabled())
.collect(Collectors.joining("+"));
|
43,943 | levelSlider = new DoubleSlider(soundEffect.getLevel(subEffectKey), soundEffect.getMinimumValue(subEffectKey),
soundEffect.getMaximumValue(subEffectKey), soundEffect.getStepSize(subEffectKey));
levelSlider.addChangeListener(cl -> saveValue());
add(lowerBoundLabel, "1, 1");
add(higherBoundLabel, "4, 1");
<BUG>if(soundEffect.getSubEffects().size() == 1) {
</BUG>
add(levelSlider, "2, 1, 2, 1");
} else {
add(subEffectNameLabel, "2 ,1");
| if (soundEffect.getSubEffects().size() == 1) {
|
43,944 | import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
<BUG>import lombok.extern.slf4j.Slf4j;
@Slf4j</BUG>
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class Voice {
@AllArgsConstructor
| @Getter
@Slf4j
|
43,945 | isLastWord = true;
}
speek(words.get(i));
}
} else {
<BUG>words.stream().forEach(w -> speek(w));
}</BUG>
}
private void executeSpeaking(String speech) throws SynthesisException, InterruptedException {
AudioInputStream audio = marytts.generateAudio(speech.trim());
| words.forEach(w -> speek(w));
|
43,946 | import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
<BUG>import java.util.List;
import java.util.prefs.Preferences;</BUG>
import java.util.stream.Collectors;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
| import java.util.Locale;
import java.util.prefs.Preferences;
|
43,947 | import org.xml.sax.SAXException;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
<BUG>@Slf4j
@AllArgsConstructor(access = AccessLevel.PRIVATE)</BUG>
public class Language {
private static final List<Language> LANGUAGES = new ArrayList<>();
private static final Preferences PREFERENCES = Preferences.userNodeForPackage(Language.class);
| @Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
43,948 | public static Language getDefaultLanguage() {
return getLanguage(DEFAULT_LANGUAGE);
}
@Override
public String toString() {
<BUG>return name.toUpperCase();
}</BUG>
private static List<Language> readAllLanguages() {
File installationDir = new File(
PROPERTIES.getSettingsDirectory() + File.separator + Application.INSTALLATION_DIR);
| return language + " - " + country;
|
43,949 | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
<BUG>import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;</BUG>
public final class PatchUtils {
| import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
43,950 | package org.jboss.as.patching.runner;
<BUG>import org.jboss.as.boot.DirectoryStructure;
import org.jboss.as.patching.LocalPatchInfo;</BUG>
import org.jboss.as.patching.PatchInfo;
import org.jboss.as.patching.PatchLogger;
import org.jboss.as.patching.PatchMessages;
| import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp;
import org.jboss.as.patching.CommonAttributes;
import org.jboss.as.patching.LocalPatchInfo;
|
43,951 | private static final String PATH_DELIMITER = "/";
public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;
enum Element {
ADDED_BUNDLE("added-bundle"),
ADDED_MISC_CONTENT("added-misc-content"),
<BUG>ADDED_MODULE("added-module"),
BUNDLES("bundles"),</BUG>
CUMULATIVE("cumulative"),
DESCRIPTION("description"),
MISC_FILES("misc-files"),
| APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
43,952 | final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
<BUG>case APPLIES_TO_VERSION:
builder.addAppliesTo(value);
break;</BUG>
case RESULTING_VERSION:
if(type == Patch.PatchType.CUMULATIVE) {
| [DELETED] |
43,953 | final StringBuilder path = new StringBuilder();
for(final String p : item.getPath()) {
path.append(p).append(PATH_DELIMITER);
}
path.append(item.getName());
<BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());
if(type != ModificationType.REMOVE) {</BUG>
writer.writeAttribute(Attribute.HASH.name, bytesToHexString(item.getContentHash()));
}
if(type != ModificationType.ADD) {
| if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
43,954 | package org.jboss.as.patching;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.patching.runner.PatchingException;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
<BUG>import org.jboss.logging.annotations.MessageBundle;
import java.io.IOException;</BUG>
import java.util.List;
@MessageBundle(projectCode = "JBAS")
public interface PatchMessages {
| import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
43,955 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
43,956 | }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memo);
<BUG>ChinaPhoneHelper.setStatusBar(this,true);
</BUG>
topicId = getIntent().getLongExtra("topicId", -1);
if (topicId == -1) {
finish();
| ChinaPhoneHelper.setStatusBar(this, true);
|
43,957 | MemoEntry.COLUMN_REF_TOPIC__ID + " = ?"
, new String[]{String.valueOf(topicId)});
}
public Cursor selectMemo(long topicId) {
Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,
<BUG>MemoEntry._ID + " DESC", null);
</BUG>
if (c != null) {
c.moveToFirst();
}
| MemoEntry.COLUMN_ORDER + " ASC", null);
|
43,958 | MemoEntry._ID + " = ?",
new String[]{String.valueOf(memoId)});
}
public long updateMemoContent(long memoId, String memoContent) {
ContentValues values = new ContentValues();
<BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent);
return db.update(</BUG>
MemoEntry.TABLE_NAME,
values,
MemoEntry._ID + " = ?",
| return db.update(
|
43,959 | import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kiminonawa.mydiary.R;
import com.kiminonawa.mydiary.db.DBManager;
import com.kiminonawa.mydiary.shared.EditMode;
<BUG>import com.kiminonawa.mydiary.shared.ThemeManager;
import java.util.List;
public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode {
</BUG>
private List<MemoEntity> memoList;
| import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
43,960 | private DBManager dbManager;
private boolean isEditMode = false;
private EditMemoDialogFragment.MemoCallback callback;
private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;
<BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) {
this.mActivity = activity;</BUG>
this.topicId = topicId;
this.memoList = memoList;
| public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
43,961 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
43,962 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
43,963 | import com.mraof.minestuck.entity.EntityListFilter;
import com.mraof.minestuck.entity.EntityMinestuck;
import com.mraof.minestuck.entity.ai.EntityAIHurtByTargetAllied;
import com.mraof.minestuck.entity.ai.EntityAINearestAttackableTargetWithHeight;
import com.mraof.minestuck.entity.item.EntityGrist;
<BUG>import com.mraof.minestuck.entity.item.EntityVitalityGel;
import com.mraof.minestuck.network.skaianet.SburbHandler;</BUG>
import com.mraof.minestuck.util.Echeladder;
import com.mraof.minestuck.util.GristAmount;
import com.mraof.minestuck.util.GristSet;
| import com.mraof.minestuck.item.MinestuckItems;
import com.mraof.minestuck.network.skaianet.SburbHandler;
|
43,964 | @SuppressWarnings("unchecked")
protected static EntityListFilter underlingSelector = new EntityListFilter(Arrays.<Class<? extends EntityLivingBase>>asList(EntityImp.class, EntityOgre.class, EntityBasilisk.class, EntityGiclops.class));
protected EntityListFilter attackEntitySelector;
protected GristType type;
public String underlingName;
<BUG>public boolean fromSpawner;
private static final float maxSharedProgress = 2; //The multiplier for the maximum amount progress that can be gathered from each enemy with the group fight bonus</BUG>
protected Map<EntityPlayerMP, Double> damageMap = new HashMap<EntityPlayerMP, Double>(); //Map that stores how much damage each player did to this to this underling. Null is used for environmental or other non-player damage
protected static Random randStatic = new Random();
public EntityUnderling(World par1World, String underlingName)
| public boolean dropCandy;
private static final float maxSharedProgress = 2; //The multiplier for the maximum amount progress that can be gathered from each enemy with the group fight bonus
|
43,965 | public static Item fluoriteOctet;
public static Item sickle;
public static Item homesSmellYaLater;
public static Item fudgeSickle;
public static Item regiSickle;
<BUG>public static Item clawSickle;
public static Item deuceClub;</BUG>
public static Item nightClub;
public static Item pogoClub;
public static Item metalBat;
| public static Item candySickle;
public static Item deuceClub;
|
43,966 | fluoriteOctet = GameRegistry.register(new ItemDice(EnumDiceType.FLUORITE_OCTET).setRegistryName("fluorite_octet"));
sickle = GameRegistry.register(new ItemSickle(EnumSickleType.SICKLE).setRegistryName("sickle"));
homesSmellYaLater = GameRegistry.register(new ItemSickle(EnumSickleType.HOMES).setRegistryName("homes_smell_ya_later"));
fudgeSickle = GameRegistry.register(new ItemSickle(EnumSickleType.FUDGE).setRegistryName("fudgesickle"));
regiSickle = GameRegistry.register(new ItemSickle(EnumSickleType.REGISICKLE).setRegistryName("regisickle"));
<BUG>clawSickle = GameRegistry.register(new ItemSickle(EnumSickleType.CLAW).setRegistryName("claw_sickle"));
deuceClub = GameRegistry.register(new ItemClub(EnumClubType.DEUCE).setRegistryName("deuce_club"));</BUG>
nightClub = GameRegistry.register(new ItemClub(EnumClubType.NIGHT).setRegistryName("nightclub"));
pogoClub = GameRegistry.register(new ItemClub(EnumClubType.POGO).setRegistryName("pogo_club"));
metalBat = GameRegistry.register(new ItemClub(EnumClubType.BAT).setRegistryName("metal_bat"));
| candySickle = GameRegistry.register(new ItemSickle(EnumSickleType.CANDY).setRegistryName("candy_sickle"));
deuceClub = GameRegistry.register(new ItemClub(EnumClubType.DEUCE).setRegistryName("deuce_club"));
|
43,967 | {
SICKLE(220, 4.0D, 8, "sickle"),
HOMES(400, 5.5D, 10, "homesSmellYaLater"),
FUDGE(450, 5.5D, 10, "fudgeSickle"),
REGISICKLE(812, 6.0D, 5, "regiSickle"),
<BUG>CLAW(2048, 7.0D, 15, "clawSickle");
private static final double DEFAULT_ATTACK_SPEED = -2.4D;</BUG>
private final int maxUses;
private final double damageVsEntity;
| CLAW(2048, 7.0D, 15, "clawSickle"),
CANDY(96, 6.0D, 15, "candySickle");
private static final double DEFAULT_ATTACK_SPEED = -2.4D;
|
43,968 | package com.mraof.minestuck.item.weapon;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
<BUG>import com.mraof.minestuck.Minestuck;
public class ItemSickle extends ItemWeapon</BUG>
{
private final EnumSickleType sickleType;
public ItemSickle(EnumSickleType sickleType)
| import com.mraof.minestuck.entity.underling.EntityUnderling;
public class ItemSickle extends ItemWeapon
|
43,969 | return this.sickleType.getEnchantability();
}
@Override
public boolean hitEntity(ItemStack itemStack, EntityLivingBase target, EntityLivingBase attacker)
{
<BUG>itemStack.damageItem(1, attacker);
return true;</BUG>
}
@Override
@SideOnly(Side.CLIENT)
| if(sickleType.equals(EnumSickleType.CANDY) && target instanceof EntityUnderling)
((EntityUnderling) target).dropCandy = true;
return true;
|
43,970 | register(fluoriteOctet);
register(sickle);
register(homesSmellYaLater);
register(fudgeSickle);
register(regiSickle);
<BUG>register(clawSickle);
register(deuceClub);</BUG>
register(nightClub);
register(pogoClub);
register(metalBat);
| register(candySickle);
register(deuceClub);
|
43,971 | GristRegistry.addGristConversion(new ItemStack(rubyCroak), false, new GristSet (new GristType[] {GristType.Build, GristType.Garnet, GristType.Ruby, GristType.Diamond}, new int [] {900, 103, 64, 16}));
GristRegistry.addGristConversion(new ItemStack(hephaestusLumber), false, new GristSet (new GristType[] {GristType.Build, GristType.Gold, GristType.Ruby}, new int[] {625, 49, 36}));
GristRegistry.addGristConversion(new ItemStack(regiSickle), false, new GristSet(new GristType[] {GristType.Amethyst, GristType.Tar, GristType.Gold}, new int[] {25, 57, 33}));
GristRegistry.addGristConversion(new ItemStack(sickle), false, new GristSet(new GristType[] {GristType.Build}, new int[] {8}));
GristRegistry.addGristConversion(new ItemStack(homesSmellYaLater), false, new GristSet(new GristType[] {GristType.Build, GristType.Amber, GristType.Amethyst}, new int[] {34, 19, 10}));
<BUG>GristRegistry.addGristConversion(new ItemStack(fudgeSickle), false, new GristSet(new GristType[] {GristType.Iodine, GristType.Amber, GristType.Chalk}, new int[] {23, 15, 12}));
GristRegistry.addGristConversion(new ItemStack(nightClub), false, new GristSet(new GristType[] {GristType.Tar, GristType.Shale, GristType.Cobalt}, new int[] {28, 19, 6}));</BUG>
GristRegistry.addGristConversion(new ItemStack(pogoClub), false, new GristSet(new GristType[] {GristType.Build, GristType.Shale}, new int[] {15, 12}));
GristRegistry.addGristConversion(new ItemStack(metalBat), false, new GristSet(new GristType[] {GristType.Build, GristType.Mercury}, new int[] {35, 23}));
GristRegistry.addGristConversion(new ItemStack(spikedClub), false, new GristSet(new GristType[] {GristType.Build, GristType.Garnet, GristType.Iodine}, new int[] {46, 38, 13}));
| GristRegistry.addGristConversion(new ItemStack(candySickle), false, new GristSet(new GristType[] {GristType.Iodine, GristType.Gold, GristType.Chalk}, new int[] {65, 38, 53}));
GristRegistry.addGristConversion(new ItemStack(nightClub), false, new GristSet(new GristType[] {GristType.Tar, GristType.Shale, GristType.Cobalt}, new int[] {28, 19, 6}));
|
43,972 | CombinationRegistry.addCombination(new ItemStack(Items.IRON_AXE), new ItemStack(Blocks.REDSTONE_BLOCK), MODE_AND, false, true, new ItemStack(rubyCroak));
CombinationRegistry.addCombination(new ItemStack(Items.GOLDEN_AXE), new ItemStack(Items.LAVA_BUCKET), MODE_AND, false, true, new ItemStack(hephaestusLumber));
CombinationRegistry.addCombination(new ItemStack(Items.IRON_HOE), new ItemStack(Items.WHEAT), MODE_AND, false, true, new ItemStack(sickle));
CombinationRegistry.addCombination(new ItemStack(sickle), new ItemStack(threshDvd), MODE_OR, false, true, new ItemStack(homesSmellYaLater));
CombinationRegistry.addCombination(new ItemStack(sickle), new ItemStack(Items.DYE,1,3), MODE_OR, false, true, new ItemStack (fudgeSickle));
<BUG>CombinationRegistry.addCombination(new ItemStack(sickle), new ItemStack(chessboard), MODE_AND, false, true, new ItemStack(regiSickle));
CombinationRegistry.addCombination(new ItemStack(deuceClub), new ItemStack(Items.SLIME_BALL), MODE_AND, false, true, new ItemStack(pogoClub));</BUG>
CombinationRegistry.addCombination(new ItemStack(deuceClub), new ItemStack(Items.IRON_INGOT), MODE_AND, false, true, new ItemStack(metalBat));
CombinationRegistry.addCombination("logWood", metalBat, OreDictionary.WILDCARD_VALUE, MODE_OR, new ItemStack(spikedClub));
CombinationRegistry.addCombination(new ItemStack(clawHammer), new ItemStack(Blocks.BRICK_BLOCK), MODE_AND, false, false, new ItemStack(sledgeHammer));
| CombinationRegistry.addCombination(new ItemStack(sickle), new ItemStack(candy, 1, 0), MODE_OR, false, true, new ItemStack(candySickle));
CombinationRegistry.addCombination(new ItemStack(fudgeSickle), new ItemStack(Items.SUGAR), MODE_AND, false, true, new ItemStack(candySickle));
CombinationRegistry.addCombination(new ItemStack(deuceClub), new ItemStack(Items.SLIME_BALL), MODE_AND, false, true, new ItemStack(pogoClub));
|
43,973 | import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.*;
import org.strangeforest.tcb.stats.model.*;
import org.strangeforest.tcb.stats.model.prediction.*;
import org.strangeforest.tcb.stats.service.*;
<BUG>import org.strangeforest.tcb.stats.util.*;
import static java.util.Comparator.*;</BUG>
import static java.util.stream.Collectors.*;
import static org.strangeforest.tcb.util.DateUtil.*;
@Controller
| import static com.google.common.base.Strings.*;
import static java.util.Comparator.*;
|
43,974 | @Cacheable(value = "Global", key = "'GOATPointsLevelResults'")
public Map<String, List<String>> getLevelResults() {
Map<String, List<String>> levelResults = new LinkedHashMap<>();
jdbcTemplate.query(LEVEL_RESULTS_QUERY, rs -> {
String level = rs.getString("level");
<BUG>String result = mapResult(level, rs.getString("result"));
List<String> results = levelResults.get(level);
if (results == null) {
results = new ArrayList<>();
levelResults.put(level, results);
}
results.add(result);</BUG>
});
| levelResults.computeIfAbsent(level, aLevel -> new ArrayList<>()).add(result);
return levelResults;
|
43,975 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
43,976 | final int lineStride = dst.getScanlineStride();
final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final byte[][] data = dst.getByteDataArrays();
final float[] warpData = new float[2 * dstWidth];
<BUG>int lineOffset = 0;
if (ctable == null) { // source does not have IndexColorModel
if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
43,977 | pixelOffset += pixelStride;
} // COLS LOOP
} // ROWS LOOP
}
} else {// source has IndexColorModel
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| } else if (caseB) {
for (int h = 0; h < dstHeight; h++) {
|
43,978 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
43,979 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
43,980 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
43,981 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
43,982 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
43,983 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final int[][] data = dst.getIntDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
43,984 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
43,985 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final float[][] data = dst.getFloatDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
43,986 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
43,987 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final double[][] data = dst.getDoubleDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
43,988 | {
@Override
public Representation represent(Variant variant)
{
try {
<BUG>DocumentInfo documentInfo = getDocumentFromRequest(getRequest(), true);
</BUG>
if (documentInfo == null) {
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
return null;
| DocumentInfo documentInfo = getDocumentFromRequest(getRequest(), getResponse(), true, false);
|
43,989 | if (documentInfo == null) {
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
return null;
}
Document doc = documentInfo.getDocument();
<BUG>if (doc == null) {
getResponse().setStatus(Status.CLIENT_ERROR_FORBIDDEN);
return null;
}</BUG>
List<com.xpn.xwiki.api.Attachment> xwikiAttachments = doc.getAttachmentList();
| [DELETED] |
43,990 | import java.util.Map;
import java.util.logging.Level;
import org.restlet.Context;
import org.restlet.data.MediaType;
import org.restlet.data.Request;
<BUG>import org.restlet.data.Response;
import org.restlet.ext.wadl.WadlResource;</BUG>
import org.restlet.resource.Variant;
import org.xwiki.rest.representers.NullRepresenter;
import com.xpn.xwiki.XWikiContext;
| import org.restlet.data.Status;
import org.restlet.ext.wadl.WadlResource;
|
43,991 | String language = (String) request.getAttributes().get(Constants.LANGUAGE_ID_PARAMETER);
String version = (String) request.getAttributes().get(Constants.VERSION_PARAMETER);
String pageFullName = Utils.getPrefixedPageName(wikiName, spaceName, pageName);
boolean existed = xwikiApi.exists(pageFullName);
if (failIfDoesntExist) {
<BUG>if (!existed) {
return null;</BUG>
}
}
Document doc = xwikiApi.getDocument(pageFullName);
| response.setStatus(Status.CLIENT_ERROR_NOT_FOUND);
return null;
|
43,992 | }
}
}
if (version != null) {
doc = doc.getDocumentRevision(version);
<BUG>}
return new DocumentInfo(doc, !existed);</BUG>
} catch (Exception e) {
return null;
}
| Document doc = xwikiApi.getDocument(pageFullName);
if (doc == null) {
response.setStatus(Status.CLIENT_ERROR_FORBIDDEN);
|
43,993 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
a[i][j] = operator.applyAsBoolean(a[i][j]);
}
| public boolean[] row(final int rowIndex) {
N.checkArgument(rowIndex >= 0 && rowIndex < n, "Invalid row Index: %s", rowIndex);
return a[rowIndex];
|
43,994 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
result[i][j] = zipFunction.apply(a[i][j], b[i][j]);
}
| public boolean get(final int i, final int j) {
return a[i][j];
|
43,995 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
result[i][j] = zipFunction.apply(a[i][j], b[i][j], c[i][j]);
}
| return new BooleanMatrix(c);
|
43,996 | }
public AsyncExecutor(int maxConcurrentThreadNumber, long keepAliveTime, TimeUnit unit) {
this.maxConcurrentThreadNumber = maxConcurrentThreadNumber;
this.keepAliveTime = keepAliveTime;
this.unit = unit;
<BUG>}
public AsyncExecutor(final ExecutorService executorService) {
this(8, 300, TimeUnit.SECONDS);
this.executorService = executorService;</BUG>
Runtime.getRuntime().addShutdownHook(new Thread() {
| [DELETED] |
43,997 | results.add(execute(cmd));
}
return results;
}
public <T> CompletableFuture<T> execute(final Callable<T> command) {
<BUG>final CompletableFuture<T> future = new CompletableFuture<T>(this, command);
getExecutorService().execute(future);</BUG>
return future;
}
public <T> List<CompletableFuture<T>> execute(final Callable<T>... commands) {
| final CompletableFuture<T> future = new CompletableFuture<>(this, command);
getExecutorService().execute(future);
|
43,998 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSystem {</BUG>
private URI uri;
private Path workingDir;
private AmazonS3Client s3;
| import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
43,999 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(ACCESS_KEY, null);
String secretKey = conf.get(SECRET_KEY, null);
</BUG>
String userInfo = name.getUserInfo();
| String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
44,000 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.