id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
37,201 | analyzerManager.getAlphaIdeoAnalyzer());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
<BUG>protected void writeError(TableInfo extractErrorTable, String containerId,
String filePath, Path extractsA) throws IOException {
Map<Cols, String> data = new HashMap<>();</BUG>
data.put(Cols.CONTAINER_ID, contain... | protected void writeExtractException(TableInfo extractExceptionTable, String containerId,
String filePath, ExtractReaderException.TYPE type) throws IOException {
Map<Cols, String> data = new HashMap<>();
|
37,202 | if (i == 0) {
data.put(Cols.IS_EMBEDDED, FALSE);
data.put(Cols.FILE_NAME, fps.getRelativeSourceFilePath().getFileName().toString());
} else {
data.put(Cols.IS_EMBEDDED, TRUE);
<BUG>data.put(Cols.FILE_NAME, FilenameUtils.getName(m.get(RecursiveParserWrapper.EMBEDDED_RESOURCE_PATH)));
</BUG>
}
data.put(Cols.FILE_EXTENSIO... | data.put(Cols.FILE_NAME, getFileName(m.get(RecursiveParserWrapper.EMBEDDED_RESOURCE_PATH)));
|
37,203 | return R.drawable.verify_fail;
}
return ViewContentHelper.getDarkCheckingLevelImageResource(Integer.parseInt(version.getStatusCheckingLevel()));
}
public void doActionOnModel(final VersionViewHolder viewHolder){
<BUG>getDownloadState(new GetDownloadStateResponse() {
</BUG>
@Override
public void foundDownloadState(Downl... | getDownloadState(new DataFileManager.GetDownloadStateResponse() {
|
37,204 | package model;
import android.content.Context;
<BUG>import android.net.Uri;
import android.util.Log;</BUG>
import org.unfoldingword.mobile.R;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
| import android.os.AsyncTask;
import android.util.Log;
|
37,205 | import model.daoModels.Book;
import model.daoModels.Version;
import model.parsers.MediaType;
import utils.FileNameHelper;
import utils.FileUtil;
<BUG>public class DataFileManager {
private static final String TAG = "DataFileManager";</BUG>
private static final String TEMP_FILE_FOLDER_NAME = "sideload";
private static f... | public interface GetDownloadStateResponse{
void foundDownloadState(DownloadState state);
}
private static final String TAG = "DataFileManager";
|
37,206 | saveSignatureForBook(context, book, data, type, book.getSignatureUrl());
}
public static void saveSignatureForBook(Context context, Book book, byte[] data, MediaType type, String url){
FileUtil.saveFile(getFileForDownload(context, type, book.getVersion(), FileNameHelper.getSaveFileNameFromUrl(url)), data);
}
<BUG>publi... | public static void getStateOfContent(final Context context, final Version version, final MediaType type, final GetDownloadStateResponse response){
new AsyncTask<Void, DownloadState, DownloadState>(){
@Override
protected DownloadState doInBackground(Void... params) {
File mediaFolder = getFileForDownload(context, type, ... |
37,207 | import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import org.unfoldingword.mobile.R;
<BUG>import java.util.List;
import model.daoModels.Version;</BUG>
public class VersionShareAdapter extends ArrayAdapter<Version> {
private VersionAdapter... | import model.DaoDBHelper;
import model.daoModels.LanguageLocale;
import model.daoModels.Version;
|
37,208 | import android.os.AsyncTask;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
<BUG>import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.WindowManager;</BUG>
import android.widget.EditText;
| import android.view.*;
|
37,209 | super.onCreate(savedInstanceState);
setContentView(R.layout.activity_note);
Misc.secureWindow(NoteActivity.this);
mBackgroundColor = 0;
mAutoSaveEnabled = PreferenceHandler.isAutosaveEnabled(NoteActivity.this);
<BUG>int id = -1;
Note bundledNote = null;</BUG>
if (savedInstanceState != null) {
id = savedInstanceState.ge... | int typeInt = -1;
Note bundledNote = null;
|
37,210 | onColorChanged(mBackgroundColor);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
updateShareIntent();
if (mNote.getIsDeleted()) {
mTitleView.setEnabled(false);
<BUG>mTextView.setEnabled(false);
}</BUG>
}
@Override
public void onResume() {
| ((View) mNoteView).setEnabled(false);
|
37,211 | return super.onOptionsItemSelected(item);
}
}
public void saveNote() {
final DatabaseHandler handler = SealnoteApplication.getDatabase();
<BUG>final String title = mTitleView.getText().toString();
final String text = mTextView.getText().toString();
</BUG>
if (title.equals("") && text.equals("")) {
Toast.makeText(this, ... | final NoteContent noteContent = mNoteView.getNoteContent();
final String text = noteContent.toString();
|
37,212 | Log.d(TAG, "Note didn't change. No need to autosave");
return;
}
mNote.setTitle(title);
<BUG>mNote.setNote(text);
mNote.setColor(mBackgroundColor);
if (mNote.getId() == -1) {</BUG>
mNote.setPosition(-1);
int newNoteId = (int) handler.addNote(mNote);
| mNote.setNote(noteContent);
mNote.setType(mNoteType);
if (mNote.getId() == -1) {
|
37,213 | case R.id.action_settings:
showSettings();
return true;
case R.id.action_logout:
TimeoutHandler.instance().expire(this);
<BUG>return true;
default:</BUG>
return super.onOptionsItemSelected(item);
}
}
| case R.id.action_new_card_note:
NoteActivity.startForNoteId(SealnoteActivity.this, -1, Note.Type.TYPE_LOGIN);
default:
|
37,214 | private void showSettings() {
Intent intent = new Intent(this, SettingsActivity.class);
this.startActivity(intent);
}
public void onCreateNoteClick(View view) {
<BUG>NoteActivity.startForNoteId(SealnoteActivity.this, -1);
</BUG>
}
private class NavigationDrawerAdapter extends ArrayAdapter<String> {
private LayoutInflat... | NoteActivity.startForNoteId(SealnoteActivity.this, -1, null);
|
37,215 | SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
EasyDate date = EasyDate.now();
values.put(COL_POSITION, note.getPosition());
values.put(COL_TITLE, note.getTitle());
<BUG>values.put(COL_NOTE, note.getNote());
</BUG>
values.put(COL_COLOR, note.getColor());
values.put(COL_CREAT... | values.put(COL_NOTE, note.getNote().toString());
|
37,216 | }
public static enum FolderAction {
}
public static enum Type {
TYPE_GENERIC,
<BUG>TYPE_PASSWORD,
TYPE_CREDIT_CARD,</BUG>
}
public Note() {
this.mId = -1;
| TYPE_LOGIN,
TYPE_CREDIT_CARD,
|
37,217 | Log.e(TAG, "Error parsing date retrieved from database!");
}
mColor = inParcel.readInt();
mArchived = inParcel.readInt() > 0;
mDeleted = inParcel.readInt() > 0;
<BUG>mType = Type.valueOf(inParcel.readString());
}</BUG>
@Override
public void writeToParcel(Parcel outParcel, int flags) {
outParcel.writeInt(mId);
| mNote = NoteContent.fromString(mType, inParcel.readString());
|
37,218 | @Override
public void writeToParcel(Parcel outParcel, int flags) {
outParcel.writeInt(mId);
outParcel.writeInt(mPosition);
outParcel.writeString(mNoteTitle);
<BUG>outParcel.writeString(mNote);
</BUG>
outParcel.writeString(mEditedDate.toString());
outParcel.writeInt(mColor);
outParcel.writeInt(mArchived ?1 :0);
| outParcel.writeString(mNote.toString());
|
37,219 | private final I18n i18n;
private Filter filter;
ApplicationElement(TodoItemRepository repository, I18n i18n) {
this.repository = repository;
this.i18n = i18n;
<BUG>Elements.Builder builder = new Elements.Builder()
.section().css("todoapp")</BUG>
.header().css("header")
.h(1).innerText(i18n.constants().todos()).end()
.i... | TodoBuilder builder = new TodoBuilder()
.section().css("todoapp")
|
37,220 | import static org.junit.Assert.assertNotNull;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class ElementsBuilderTest {
<BUG>private Elements.Builder builder;
</BUG>
@Before
public void setUp() {
Document document = mock(Document.cla... | private TestableBuilder builder;
|
37,221 | when(document.createParagraphElement()).thenAnswer(invocation -> new StandaloneElement("p"));
when(document.createSelectElement()).thenAnswer(invocation -> new StandaloneInputElement("select"));
when(document.createSpanElement()).thenAnswer(invocation -> new StandaloneElement("span"));
when(document.createTextAreaEleme... | builder = new TestableBuilder(document);
|
37,222 | TodoItemRepository repository = new TodoItemRepository(BEAN_FACTORY);
ApplicationElement application = new ApplicationElement(repository, i18n);
Element body = Browser.getDocument().getBody();
body.appendChild(application.asElement());
body.appendChild(new FooterElement(i18n).asElement());
<BUG>Element e = new MyBuilde... | [DELETED] |
37,223 | @Override
public String toString() {
return (container ? "container" : "simple") + " @ " + level + ": " + element.getTagName();
}
}
<BUG>public static class Builder extends CoreBuilder<Builder>
{
public Builder() {
super(Browser.getDocument());
}
protected Builder(Document document) {
super( document );</BUG>
}
| [DELETED] |
37,224 | return start(document.createElement(tag));
}
public B start(Element element) {
elements.push(new ElementInfo(element, true, level));
level++;
<BUG>return (B) this;
}</BUG>
public B end() {
assertCurrent();
if (level == 0) {
| return that();
|
37,225 | Element closingElement = elements.peek().element;
for (ElementInfo child : children) {
closingElement.appendChild(child.element);
}
level--;
<BUG>return (B) this;
}</BUG>
private String dumpElements() {
return elements.toString();
}
| return that();
|
37,226 | }
public B on(EventType type, EventListener listener) {
assertCurrent();
Element element = elements.peek().element;
type.register(element, listener);
<BUG>return (B) this;
}</BUG>
public B rememberAs(String id) {
assertCurrent();
references.put(id, elements.peek().element);
| public B attr(String name, String value) {
elements.peek().element.setAttribute(name, value);
return that();
|
37,227 | Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.tab_qibla, container, false);
final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass);
qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_... | sOrientationListener = new android.hardware.SensorListener() {
|
37,228 | LOG.fine("No encryption Name is configured for Symmetric KeyType");
throw new STSException("No Encryption Name is configured", STSException.REQUEST_FAILED);
}
cryptoType.setAlias(encryptionName);
try {
<BUG>X509Certificate certificate = crypto.getX509Certificates(cryptoType)[0];
KeyInfoBean keyInfo =
createKeyInfo(cer... | X509Certificate[] certs = crypto.getX509Certificates(cryptoType);
if (certs == null || certs.length <= 0) {
new STSException("Encryption certificate is not found for alias: " + encryptionName,
createKeyInfo(certs[0], secret, doc, encryptionProperties, crypto);
|
37,229 | import org.testng.annotations.Test;
import java.util.*;
public class VariantsToTableIntegrationTest extends WalkerTest {
private String variantsToTableCmd(String moreArgs) {
return "-R " + hg18Reference +
<BUG>" --variant:vcf " + testDir + "/soap_gatk_annotated.vcf" +
" -T VariantsToTable" +</BUG>
" -F CHROM -F POS -F ... | " --variant:vcf " + testDir + "soap_gatk_annotated.vcf" +
" -T VariantsToTable" +
|
37,230 | " -F CHROM -F POS -F ID -F REF -F ALT -F QUAL -F FILTER -F TRANSITION -F DP -F SB -F set -F RankSumP -F refseq.functionalClass*" +
" -L chr1 -o %s" + moreArgs;
}
private String variantsToTableMultiAllelicCmd(String moreArgs) {
return "-R " + b37KGReference +
<BUG>" --variant " + testDir + "/multiallelic.vcf" +
" -T Var... | " --variant " + testDir + "multiallelic.vcf" +
" -T VariantsToTable" +
|
37,231 | return new RegularModelDataSource(file);
}
public static boolean isLanguageAspect(ModelRoot root, IModule module, SModelFqName modelFqName) {
if (!isUnderLanguageModels(module, root)) return false;
if (!NameUtil.namespaceFromLongName(modelFqName.getLongName()).equals(module.getModuleFqName())) return false;
<BUG>if (La... | String name = NameUtil.shortNameFromLongName(modelFqName.getLongName());
for (LanguageAspect la:LanguageAspect.values()){
if (la.getName().equals(name)) return true;
|
37,232 | Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.tab_qibla, container, false);
final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass);
qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_... | sOrientationListener = new android.hardware.SensorListener() {
|
37,233 | package org.jetbrains.jet.plugin.quickfix;
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
import com.intellij.openapi.application.ApplicationManager;
import org.jetbrains.jet.lang.psi.JetFile;
<BUG>import org.jetbrains.jet.plugin.PluginTestCaseBase;
public class ImportClassHelperTest extends LightD... | import java.io.IOException;
public class ImportClassHelperTest extends LightDaemonAnalyzerTestCase {
|
37,234 | createSpacingBuilder(settings));
return FormattingModelProvider.createFormattingModelForPsiFile(
element.getContainingFile(), block, settings);
}
private static SpacingBuilder createSpacingBuilder(CodeStyleSettings settings) {
<BUG>return new SpacingBuilder(settings)
.before(IMPORT_DIRECTIVE).lineBreakInCode()</BUG>
.b... | .after(NAMESPACE_HEADER).blankLines(1)
.before(IMPORT_DIRECTIVE).lineBreakInCode()
|
37,235 | boolean bothParentheses = false;
String documentText = document.getText();
if (!(endOffset < documentText.length() && documentText.charAt(endOffset) == '(')) {
document.insertString(endOffset, "()");
bothParentheses = true;
<BUG>} else if (endOffset + 1 < documentText.length() && documentText.charAt(endOffset) == ')') ... | } else if (endOffset + 1 < documentText.length() && documentText.charAt(endOffset + 1) == ')') {
|
37,236 | import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.math.BigInteger;
import java.util.ArrayList;
<BUG>import java.util.Collection;
import static com.n1analytics.paillier.TestConfiguration.CONFIGURATIONS;</BUG>
import static com.n1analyt... | import java.util.Random;
import static com.n1analytics.paillier.TestConfiguration.CONFIGURATIONS;
|
37,237 | @RunWith(Parameterized.class)
@Category(SlowTests.class)
public class AdditionTest {
private PaillierContext context;
private PaillierPrivateKey privateKey;
<BUG>static private int maxIteration = 100;
@Parameterized.Parameters</BUG>
public static Collection<Object[]> configurations() {
Collection<Object[]> configuratio... | static private int MAX_ITERATIONS = TestConfiguration.MAX_ITERATIONS;
@Parameterized.Parameters
|
37,238 | }
}};
BinaryAdder4 binaryAdders4[] = new BinaryAdder4[]{new BinaryAdder4() {</BUG>
@Override
public EncodedNumber eval(EncodedNumber arg1, EncodedNumber arg2) {
return arg1.add(arg2);
}
<BUG>}, new BinaryAdder4() {
@Override</BUG>
public EncodedNumber eval(EncodedNumber arg1, EncodedNumber arg2) {
| }, new EncodedToEncodedAdder() {
return arg2.add(arg1);
|
37,239 | return context.add(arg2, arg1);
}
}};
<BUG>void testDoubleAddition(BinaryAdder1 adder) {
double a, b, plainResult, decodedResult, tolerance;
EncryptedNumber ciphertTextA, ciphertTextB, encryptedResult;
EncodedNumber decryptedResult;
for(int i = 0; i < maxIteration; i++) {
a = randomFiniteDouble();</BUG>
b = randomFini... | @Test
public void testDoubleAddition() {
EncryptedNumber cipherTextA, cipherTextA_obf, cipherTextB, cipherTextB_obf, encryptedResult;
EncodedNumber encodedA, encodedB, encodedResult, decryptedResult;
Random rnd = new Random();
int maxExponentDiff = (int)(0.5 * context.getPublicKey().getModulus().bitLength() / (Math.log... |
37,240 | @RunWith(Parameterized.class)
@Category(SlowTests.class)
public class DivisionTest {
private PaillierContext context;
private PaillierPrivateKey privateKey;
<BUG>static private int maxIteration = 100;
@Parameters</BUG>
public static Collection<Object[]> configurations() {
Collection<Object[]> configurationParams = new ... | static private int maxIteration = TestConfiguration.MAX_ITERATIONS;
@Parameters
|
37,241 | 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 pag... | PDPage currPage = document.getDocumentCatalog().getPages().get(pageNo);
PDPageContentStream pageStream = new PDPageContentStream(document, currPage, PDPageContentStream.AppendMode.APPEND, false);
|
37,242 | 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),... | font = getFont(split[1]);
color = new Color(Integer.valueOf(split[2].substring(1), 16));
|
37,243 | 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.Logg... | import org.apache.pdfbox.pdmodel.font.PDType1Font;
import org.apache.pdfbox.util.Matrix;
import org.slf4j.Logger;
|
37,244 | 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, ... | String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, text);
|
37,245 | 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.sh... | stream.setTextMatrix(new Matrix(1,0,0,1, textX, textY));
stream.showText(text);
|
37,246 | 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... | stream.moveTo(textX, textY - lineOffset);
stream.lineTo(textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
|
37,247 | 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());
... | List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());
if (breakSplitted.size() > 1) {
|
37,248 | 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;
|
37,249 | }else if(programsSelected.size() == 1){
lytProgsPanel.setVisibility(View.VISIBLE);
lytProg2MAHAdsExtDlg.setVisibility(View.GONE);
prog1 = programsSelected.get(0);
((TextView)view.findViewById(R.id.tvProg1NameMAHAdsExtDlg)).setText(prog1.getName());
<BUG>if (prog1.getImg() != null && !prog1.getImg().trim().isEmpty()) {
... | Picasso.with(view.getContext())
.load(MAHAdsController.urlRootOnServer + prog1.getImg())
.placeholder(R.drawable.img_place_holder_normal)
.error(R.drawable.img_not_found)
.into((ImageView) view.findViewById(R.id.ivProg1ImgMAHAds));
AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1... |
37,250 | 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.SCAL... | VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
|
37,251 | 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 *... | VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
|
37,252 | 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() {
|
37,253 | </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() {
|
37,254 | });
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.ad... | time.align(Align.left).columnAlign(Align.left);
mainActors.add(time);
|
37,255 | 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, fal... | objects.align(Align.left).columnAlign(Align.left);
mainActors.add(objects);
|
37,256 | 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"), musicCompo... | music.align(Align.left).columnAlign(Align.left);
mainActors.add(music);
|
37,257 | package org.itsnat.droid.impl.xmlinflater.layout.attr;
import android.graphics.Typeface;
import android.view.View;
import org.itsnat.droid.impl.dom.DOMAttr;
import org.itsnat.droid.impl.util.MapSmart;
<BUG>import org.itsnat.droid.impl.xmlinflater.layout.AttrLayoutContext;
import org.itsnat.droid.impl.xmlinflater.layout... | import org.itsnat.droid.impl.xmlinflater.layout.PendingViewPostCreateProcess;
import org.itsnat.droid.impl.xmlinflater.layout.classtree.ClassDescViewBased;
|
37,258 | {
public AttrDescView_widget_Switch_typeface(ClassDescViewBased parent)
{
super(parent,"typeface");
}
<BUG>@Override
protected Typeface getCurrentTypeface(View view)
{
Switch swView = (Switch)view;
return swView.getTypeface();</BUG>
}
| [DELETED] |
37,259 | super(parent,name,"mScrollCache","scrollBar",methodName,MiscUtil.resolveClass("android.view.View$ScrollabilityCache"),MiscUtil.resolveClass("android.widget.ScrollBarDrawable"),boolean.class);
}
@Override
public void setAttribute(final View view, DOMAttr attr, AttrLayoutContext attrCtx)
{
<BUG>final boolean convertedVal... | [DELETED] |
37,260 | package org.itsnat.droid.impl.xmlinflater.layout.attr.widget;
import android.graphics.Typeface;
import android.view.View;
<BUG>import android.widget.Switch;
import org.itsnat.droid.impl.xmlinflater.layout.attr.AttrDescViewTextStyle;</BUG>
import org.itsnat.droid.impl.xmlinflater.layout.classtree.ClassDescViewBased;
pub... | import org.itsnat.droid.impl.xmlinflater.layout.PendingViewPostCreateProcess;
import org.itsnat.droid.impl.xmlinflater.layout.attr.AttrDescViewTextStyle;
|
37,261 | import android.widget.TextView;
import android.widget.ToggleButton;
import org.itsnat.droid.InflatedLayout;
import org.itsnat.droid.ItsNatDroidException;
import org.itsnat.droid.ItsNatDroidRoot;
<BUG>import org.itsnat.droid.impl.ItsNatDroidImpl;
import org.itsnat.itsnatdroidtest.R;</BUG>
import org.itsnat.itsnatdroidte... | import org.itsnat.droid.impl.xmlinflater.FieldContainer;
import org.itsnat.itsnatdroidtest.R;
|
37,262 | assertEquals(compTextView2.getScaleY(), parsedTextView2.getScaleY());
assertFalse(compTextView2.isSoundEffectsEnabled());
assertEquals(compTextView2.isSoundEffectsEnabled(), parsedTextView2.isSoundEffectsEnabled());
assertEquals((String) compTextView2.getTag(), "theTag");
assertEquals((String) compTextView2.getTag(), (... | [DELETED] |
37,263 | assertEquals(compLayout.getEllipsize(), TextUtils.TruncateAt.MARQUEE);
assertEquals(compLayout.getEllipsize(),parsedLayout.getEllipsize());
assertEquals((Integer)TestUtil.getField(compLayout, "mMinWidth"), 50);
assertEquals((Integer)TestUtil.getField(compLayout, "mMinWidth"),(Integer)TestUtil.getField(parsedLayout, "mM... | assertEquals(compLayout.getTypeface().getStyle(),parsedLayout.getTypeface().getStyle());
assertTrue(compLayout.getFreezesText());
|
37,264 | return new DomainPermissionImpl(sysPermissionName, withGrant);
}
public static DomainPermission getInstance(DomainPermission domainPermission) {
if (domainPermission instanceof DomainPermissions.DomainPermissionImpl) {
return domainPermission;
<BUG>}
if (!getSysPermissionName(domainPermission.getSystemPermissionId()).e... | final DomainPermission verifiedPermission;
|
37,265 | package com.projecttango.examples.java.augmentedreality;
import com.google.atap.tangoservice.Tango;
import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoCameraIntrinsics;
import com.google.atap.tangoservice.TangoConfig;
<BUG>import com.google.atap.tangoservice.TangoC... | import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
37,266 | super.onResume();
if (!mIsConnected) {
mTango = new Tango(AugmentedRealityActivity.this, new Runnable() {
@Override
public void run() {
<BUG>try {
connectTango();</BUG>
setupRenderer();
mIsConnected = true;
} catch (TangoOutOfDateException e) {
| TangoSupport.initialize();
connectTango();
|
37,267 | if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) {
mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics);
mCameraPoseTimestamp = lastFramePose.timestamp;</BUG>
} else {
<BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread);
}</BUG>
}
}
}
@Override
| mRenderer.updateRenderCameraPose(lastFramePose);
mCameraPoseTimestamp = lastFramePose.timestamp;
Log.w(TAG, "Can't get device pose at time: " +
|
37,268 | import org.rajawali3d.materials.Material;
import org.rajawali3d.materials.methods.DiffuseMethod;
import org.rajawali3d.materials.textures.ATexture;
import org.rajawali3d.materials.textures.StreamingTexture;
import org.rajawali3d.materials.textures.Texture;
<BUG>import org.rajawali3d.math.Matrix4;
import org.rajawali3d.... | import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
37,269 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.t... | public void updateRenderCameraPose(TangoPoseData cameraPose) {
float[] rotation = cameraPose.getRotationAsFloats();
float[] translation = cameraPose.getTranslationAsFloats();
Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);
getCurrentCamera().setRotation(quaternion.conjugate()... |
37,270 | package com.projecttango.examples.java.helloareadescription;
import com.google.atap.tangoservice.Tango;
<BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoConfig;</BUG>
import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangos... | import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
37,271 | public class AlternateDataSourceTest {
@Deployment
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class, "test.war")
.addClasses(DataSourceTester.class)
<BUG>.addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml"), "META-INF/ejb-jar.xml");
</BUG>
}
@EJB
private DataSourceTester te... | .addAsResource(new ClassLoaderAsset("META-INF/beans.xml"), "META-INF/beans.xml");
|
37,272 | import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.extensions.PluginDescriptor;
import com.intellij.openapi.options.OptionsBundle;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.ui.Messages;
<BUG>import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openap... | import com.intellij.openapi.util.io.FileUtilRt;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.util.PairProcessor;
|
37,273 | import com.intellij.util.containers.MultiMap;
import com.intellij.util.io.ZipUtil;
import gnu.trove.THashSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
<BUG>import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
... | import java.io.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
|
37,274 | if (file.exists()) {
ZipUtil.addFileOrDirRecursively(output, saveFile, file, relativePath, null, writtenItemRelativePaths);
</BUG>
}
<BUG>}
exportInstalledPlugins(saveFile, output, writtenItemRelativePaths);
final File magicFile = new File(FileUtil.getTempDirectory(), ImportSettingsFilenameFilter.SETTINGS_JAR_MARKER);
... | String rPath = FileUtilRt.getRelativePath(configRoot, file.getAbsolutePath(), File.separatorChar);
assert rPath != null;
ZipUtil.addFileOrDirRecursively(zipOut, null, file, FileUtilRt.toSystemIndependentName(rPath), null, writtenItemRelativePaths);
exportInstalledPlugins(zipOut);
ZipEntry zipEntry = new ZipEntry(Import... |
37,275 | for (int i = 0; i < attributeSize; i++) {
CommonConnDef.Attribute attribute = CommonConnDef.Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
case ENABLED: {
final Location location = reader.getLocation();
<BUG>String value = rawAttributeText(reader, ENABLED.getXmlName());
ENABLED.parseAndSetPara... | if (value != null) {
break;
|
37,276 | ENABLED.parseAndSetParameter(value, connectionDefinitionNode, location);
break;</BUG>
}
case JNDI_NAME: {
final Location location = reader.getLocation();
<BUG>jndiName = rawAttributeText(reader, JNDINAME.getXmlName());
JNDINAME.parseAndSetParameter(jndiName, connectionDefinitionNode, location);
break;</BUG>
}
case POOL... | break;
if(jndiName != null) {
break;
|
37,277 | poolName = rawAttributeText(reader, POOL_NAME_NAME);
break;
}
case USE_JAVA_CONTEXT: {
final Location location = reader.getLocation();
<BUG>String value = rawAttributeText(reader, USE_JAVA_CONTEXT.getXmlName());
USE_JAVA_CONTEXT.parseAndSetParameter(value, connectionDefinitionNode, location);
break;</BUG>
}
case USE_CC... | if (value != null) {
|
37,278 | USE_JAVA_CONTEXT.parseAndSetParameter(value, connectionDefinitionNode, location);
break;</BUG>
}
case USE_CCM: {
final Location location = reader.getLocation();
<BUG>String value = rawAttributeText(reader, USE_CCM.getXmlName());
USE_CCM.parseAndSetParameter(value, connectionDefinitionNode, location);
break;</BUG>
}
cas... | break;
if (value != null) {
break;
|
37,279 | USE_CCM.parseAndSetParameter(value, connectionDefinitionNode, location);
break;</BUG>
}
case CLASS_NAME: {
final Location location = reader.getLocation();
<BUG>String value = rawAttributeText(reader, CLASS_NAME.getXmlName());
CLASS_NAME.parseAndSetParameter(value, connectionDefinitionNode, location);
break;</BUG>
}
def... | break;
if (value != null) {
break;
|
37,280 | CommonAdminObject.Attribute attribute = CommonAdminObject.Attribute.forName(reader
.getAttributeLocalName(i));
switch (attribute) {
case ENABLED: {
final Location location = reader.getLocation();
<BUG>String value = rawAttributeText(reader, ENABLED.getXmlName());
ENABLED.parseAndSetParameter(value, adminObjectNode, loc... | if (value != null) {
break;
|
37,281 | ENABLED.parseAndSetParameter(value, adminObjectNode, location);
break;</BUG>
}
case JNDI_NAME: {
final Location location = reader.getLocation();
<BUG>jndiName = rawAttributeText(reader, JNDINAME.getXmlName());
JNDINAME.parseAndSetParameter(jndiName, adminObjectNode, location);
break;</BUG>
}
case POOL_NAME: {
| break;
if (jndiName != null) {
break;
|
37,282 | poolName = rawAttributeText(reader, POOL_NAME_NAME);
break;
}
case USE_JAVA_CONTEXT: {
final Location location = reader.getLocation();
<BUG>String value = rawAttributeText(reader, USE_JAVA_CONTEXT.getXmlName());
USE_JAVA_CONTEXT.parseAndSetParameter(value, adminObjectNode, location);
break;</BUG>
}
case CLASS_NAME: {
| if (value != null) {
|
37,283 | USE_JAVA_CONTEXT.parseAndSetParameter(value, adminObjectNode, location);
break;</BUG>
}
case CLASS_NAME: {
final Location location = reader.getLocation();
<BUG>String value = rawAttributeText(reader, CLASS_NAME.getXmlName());
CLASS_NAME.parseAndSetParameter(value, adminObjectNode, location);
break;</BUG>
}
default:
| break;
if (value != null) {
break;
|
37,284 | writer.writeCharacters(value);
writer.writeEndElement();
}
private void writeAdminObject(XMLExtendedStreamWriter streamWriter, ModelNode adminObject, final String poolName) throws XMLStreamException {
streamWriter.writeStartElement(ResourceAdapter.Tag.ADMIN_OBJECT.getLocalName());
<BUG>CLASS_NAME.marshallAsAttribute(ad... | CLASS_NAME.marshallAsAttribute(adminObject, streamWriter);
JNDINAME.marshallAsAttribute(adminObject, streamWriter);
ENABLED.marshallAsAttribute(adminObject, streamWriter);
USE_JAVA_CONTEXT.marshallAsAttribute(adminObject, streamWriter);
streamWriter.writeAttribute("pool-name", poolName);
|
37,285 | writeNewConfigProperties(streamWriter, adminObject);
streamWriter.writeEndElement();
}
private void writeConDef(XMLExtendedStreamWriter streamWriter, ModelNode conDef, final String poolName, final boolean isXa) throws XMLStreamException {
streamWriter.writeStartElement(ResourceAdapter.Tag.CONNECTION_DEFINITION.getLocal... | CLASS_NAME.marshallAsAttribute(conDef, streamWriter);
JNDINAME.marshallAsAttribute(conDef, streamWriter);
ENABLED.marshallAsAttribute(conDef, streamWriter);
USE_JAVA_CONTEXT.marshallAsAttribute(conDef, streamWriter);
USE_CCM.marshallAsAttribute(conDef, streamWriter);
writeNewConfigProperties(streamWriter, conDef);
|
37,286 | }
}
if (conDef.hasDefined(APPLICATION.getName()) || conDef.hasDefined(SECURITY_DOMAIN.getName())
|| conDef.hasDefined(SECURITY_DOMAIN_AND_APPLICATION.getName())) {
streamWriter.writeStartElement(CommonConnDef.Tag.SECURITY.getLocalName());
<BUG>APPLICATION.marshallAsElement(conDef, false, streamWriter);
SECURITY_DOMAIN.... | APPLICATION.marshallAsElement(conDef, streamWriter);
SECURITY_DOMAIN.marshallAsElement(conDef, streamWriter);
SECURITY_DOMAIN_AND_APPLICATION.marshallAsElement(conDef, streamWriter);
streamWriter.writeEndElement();
|
37,287 | || conDef.hasDefined(RECOVERLUGIN_PROPERTIES.getName()) || conDef.hasDefined(NO_RECOVERY.getName())) {
streamWriter.writeStartElement(CommonConnDef.Tag.RECOVERY.getLocalName());
if (conDef.hasDefined(RECOVERY_USERNAME.getName()) || conDef.hasDefined(RECOVERY_PASSWORD.getName())
|| conDef.hasDefined(RECOVERY_SECURITY_DO... | RECOVERY_USERNAME.marshallAsElement(conDef, streamWriter);
RECOVERY_PASSWORD.marshallAsElement(conDef, streamWriter);
RECOVERY_SECURITY_DOMAIN.marshallAsElement(conDef, streamWriter);
streamWriter.writeEndElement();
|
37,288 | .getValue().asString(), org.jboss.jca.common.api.metadata.common.Extension.Tag.CONFIG_PROPERTY.getLocalName());
}
}
streamWriter.writeEndElement();
}
<BUG>NO_RECOVERY.marshallAsAttribute(conDef, false, streamWriter);
}</BUG>
streamWriter.writeEndElement();
}
@Override
| NO_RECOVERY.marshallAsAttribute(conDef, streamWriter);
|
37,289 | 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 ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
37,290 | 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;
|
37,291 | 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"),
MIS... | APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
37,292 | 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_VE... | [DELETED] |
37,293 | 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, bytesToHex... | if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
37,294 | 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>
impor... | import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
37,295 | private volatile IndexProvider localIndexProvider;
private final int machineId;
private volatile MasterServer masterServer;
private final AtomicBoolean reevaluatingMyself = new AtomicBoolean();
private ScheduledExecutorService updatePuller;
<BUG>private volatile Machine cachedMaster = Machine.NO_MACHINE;
private volati... | [DELETED] |
37,296 | System.out.println( "looked up master " + master );
master = broker.getMasterReally();
<BUG>}
boolean iAmCurrentlyMaster = masterServer != null;
boolean restarted = false;
if ( cachedMaster.getMachineId() != master.other().getMachineId() )
{</BUG>
if ( master.other().getMachineId() == machineId )
{
if ( this.localGraph... | [DELETED] |
37,297 | if ( this.localGraph == null || !iAmCurrentlyMaster )
{
internalShutdown();
startAsMaster();
restarted = true;
<BUG>}
}</BUG>
else
{
if ( this.localGraph == null || iAmCurrentlyMaster )
| broker.rebindMaster();
|
37,298 | startAsSlave();
tryToEnsureIAmNotABrokenMachine( master );
restarted = true;
}
}
<BUG>}
if ( masterServer != null )
{
broker.rebindMaster();
}</BUG>
if ( restarted )
| [DELETED] |
37,299 | this.localGraph.registerKernelEventHandler( handler );
}
this.localDataSourceManager =
localGraph.getConfig().getTxModule().getXaDataSourceManager();
}
<BUG>cachedMaster = master.other();
started = true;</BUG>
}
finally
{
| [DELETED] |
37,300 | connectedSlaveChannels.remove( channel );
}
}
public void shutdown()
{
<BUG>deadConnectionsPoller.shutdown();
channelGroup.close().awaitUninterruptibly();</BUG>
}
private boolean channelIsClosed( Channel channel )
{
| System.out.println( "Master server shutdown, closing all channels" );
channelGroup.close().awaitUninterruptibly();
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.