id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
6,601
public Mode getMode() { return mode; } @Override <BUG>public void setMode(Mode mode) { this.mode = mode; } @Override</BUG> public AnnotationLayer getRememberedSpanLayer()
[DELETED]
6,602
private JCas getCas(AnnotatorState aState) throws UIMAException, IOException, ClassNotFoundException { if (aState.getMode().equals(Mode.ANNOTATION) || aState.getMode().equals(Mode.AUTOMATION) <BUG>|| aState.getMode().equals(Mode.CORRECTION) || aState.getMode().equals(Mode.CORRECTION_MERGE)) {</BUG> return repository.r...
|| aState.getMode().equals(Mode.CORRECTION)) {
6,603
import de.tudarmstadt.ukp.clarin.webanno.brat.adapter.TypeRenderer; import de.tudarmstadt.ukp.clarin.webanno.brat.message.GetDocumentResponse; import de.tudarmstadt.ukp.clarin.webanno.brat.render.BratRenderer; import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationDocument; import de.tudarmstadt.ukp.clarin.webanno.mo...
import de.tudarmstadt.ukp.clarin.webanno.model.Mode; import de.tudarmstadt.ukp.clarin.webanno.support.JSONUtil;
6,604
LOG.error("Unable to read annotation document", e); error("Unable to read annotation document: " + ExceptionUtils.getRootCauseMessage(e)); } GetDocumentResponse response = new GetDocumentResponse(); response.setText(jCas.getDocumentText()); <BUG>AnnotatorStateImpl bratAnnotatorModel = new AnnotatorStateImpl(); </BUG> B...
AnnotatorStateImpl bratAnnotatorModel = new AnnotatorStateImpl(Mode.ANNOTATION);
6,605
import java.util.Locale; import java.util.Map; import java.util.TreeMap; public class DependencyConvergenceReport extends AbstractProjectInfoReport <BUG>{ private List reactorProjects; private static final int PERCENTAGE = 100;</BUG> public String getOutputName() {
private static final int PERCENTAGE = 100; private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment .getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
6,606
sink.section1(); sink.sectionTitle1(); sink.text( getI18nString( locale, "title" ) ); sink.sectionTitle1_(); Map dependencyMap = getDependencyMap(); <BUG>generateLegend( locale, sink ); generateStats( locale, sink, dependencyMap ); generateConvergence( locale, sink, dependencyMap ); sink.section1_();</BUG> sink.body_()...
sink.lineBreak(); sink.section1_();
6,607
Iterator it = artifactMap.keySet().iterator(); while ( it.hasNext() ) { String version = (String) it.next(); sink.tableRow(); <BUG>sink.tableCell(); sink.text( version );</BUG> sink.tableCell_(); sink.tableCell(); generateVersionDetails( sink, artifactMap, version );
sink.tableCell( String.valueOf( cellWidth ) + "px" ); sink.text( version );
6,608
sink.tableCell(); sink.text( getI18nString( locale, "legend.shared" ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableCell(); iconError( sink );</BUG> sink.tableCell_(); sink.tableCell(); sink.text( getI18nString( locale, "legend.different" ) );
sink.tableCell( "15px" ); // according /images/icon_error_sml.gif iconError( sink );
6,609
sink.tableCaption(); sink.text( getI18nString( locale, "stats.caption" ) ); sink.tableCaption_();</BUG> sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.subprojects" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); s...
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
6,610
sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.dependencies" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( depCount ) );
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.dependencies" ) ); sink.tableHeaderCell_();
6,611
sink.text( String.valueOf( convergence ) + "%" ); sink.bold_(); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.readyrelease" ) ); sink.tableHeaderCell_();
6,612
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
6,613
package model; import model.battlefield.Battlefield; import model.battlefield.BattlefieldFactory; <BUG>import model.battlefield.map.parcel.ParcelManager; import model.builders.entity.definitions.DefParser;</BUG> import event.BattleFieldUpdateEvent; import event.EventManager; import geometry.tools.LogUtil;
import model.builders.MapArtisan; import model.builders.entity.definitions.DefParser;
6,614
private static void setBattlefield(Battlefield battlefield) { if (battlefield != null) { ModelManager.battlefield = battlefield; battlefieldReady = true; ParcelManager.createParcelMeshes(ModelManager.getBattlefield().getMap()); <BUG>getBattlefield().getMap().resetTrinkets(); getBattlefield().getEngagement().reset();</B...
MapArtisan.act(getBattlefield().getMap()); getBattlefield().getEngagement().reset();
6,615
package controller.editor; <BUG>import model.ModelManager; import model.battlefield.lighting.SunLight;</BUG> import model.editor.ToolManager; import com.jme3.input.InputManager; import com.jme3.input.KeyInput;
import model.Reporter; import model.battlefield.lighting.SunLight;
6,616
protected final static String DEC_GREEN = "decgreen"; protected final static String DEC_BLUE = "decblue"; protected final static String RESET_COLOR = "resetcolor"; protected final static String SAVE = "save"; protected final static String LOAD = "load"; <BUG>protected final static String NEW = "new"; boolean analogUnpr...
protected final static String REPORT = "report"; boolean analogUnpressed = false;
6,617
mappings = new String[] { SWITCH_CTRL_1, SWITCH_CTRL_2, SWITCH_CTRL_3, PRIMARY_ACTION, SECONDARY_ACTION, TOGGLE_PENCIL_SHAPE, TOGGLE_PENCIL_MODE, INC_SELECTOR_RADIUS, DEC_SELECTOR_RADIUS, SET_CLIFF_TOOL, SET_HEIGHT_TOOL, SET_ATLAS_TOOL, SET_RAMP_TOOL, SET_UNIT_TOOL, TOGGLE_GRID, TOGGLE_SOWER, TOGGLE_SET, TOGGLE_OPERATI...
DEC_BLUE, RESET_COLOR, SAVE, LOAD, NEW, REPORT};
6,618
inputManager.addMapping(DEC_GREEN, new KeyTrigger(KeyInput.KEY_NUMPAD2)); inputManager.addMapping(DEC_BLUE, new KeyTrigger(KeyInput.KEY_NUMPAD3)); inputManager.addMapping(RESET_COLOR, new KeyTrigger(KeyInput.KEY_NUMPAD0)); inputManager.addMapping(SAVE, new KeyTrigger(KeyInput.KEY_F5)); inputManager.addMapping(LOAD, new...
inputManager.addMapping(REPORT, new KeyTrigger(KeyInput.KEY_SPACE)); inputManager.addListener(this, mappings);
6,619
case LOAD: ModelManager.loadBattlefield(); break; case NEW: ModelManager.setNewBattlefield(); <BUG>break; }</BUG> ctrl.guiController.askRedraw(); } }
case REPORT: Reporter.reportAll();
6,620
List<MapStyleBuilder> builders = BuilderManager.getAllMapStyleBuilders(); List<String> ids = new ArrayList<>(); for (MapStyleBuilder b : builders) { ids.add(b.getId()); } <BUG>int selIndex = ids.indexOf(ModelManager.getBattlefield().getMap().mapStyleID); </BUG> fillDropDown(DROPDOWN_STYLE_ID, ids, selIndex); } private ...
int selIndex = ids.indexOf(ModelManager.getBattlefield().getMap().getMapStyleID());
6,621
<BUG>package geometry.structure.grid; public class Node { protected final int index; protected final Grid<? extends Node> grid; public Node(Grid<? extends Node> grid, int index) {</BUG> this.grid = grid;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @JsonProperty @JsonIgnore protected Grid<? extends Node> grid; public Node(Grid<? extends Node> grid, int index) {
6,622
package geometry.structure.grid; import geometry.collections.Map2D; import geometry.geom2d.Point2D; import java.util.ArrayList; import java.util.List; <BUG>public class Grid<T extends Node> extends Map2D<T> { public Grid(int width, int height) {</BUG> super(width, height); } public T getNorthNode(T n){
public Grid(){ super(); public Grid(int width, int height) {
6,623
import geometry.geom2d.Point2D; import geometry.geom3d.Point3D; import geometry.geom3d.Triangle3D; import geometry.math.Angle; import geometry.structure.grid.Grid; <BUG>public class Grid3D<T extends Node3D> extends Grid<T> { public Grid3D(int width, int height) {</BUG> super(width, height); } private Triangle3D getTria...
public Grid3D(){ super(); public Grid3D(int width, int height) {
6,624
import java.util.ArrayList; import java.util.List; public class Map2D<E> { private List<E> values; protected int xSize; <BUG>protected int ySize; public Map2D(int xSize, int ySize) {</BUG> this(xSize, ySize, null); } public Map2D(int xSize, int ySize, E defaultVal) {
public Map2D(){ public Map2D(int xSize, int ySize) {
6,625
} public Map2D(int xSize, int ySize, E defaultVal) { this.xSize = xSize; this.ySize = ySize; values = new ArrayList<>(xSize*ySize); <BUG>setAll(defaultVal); </BUG> } public void set(int index, E val) { values.set(index, val);
public Map2D(int xSize, int ySize) { this(xSize, ySize, null); setAllAs(defaultVal);
6,626
return x >= 0 && x < xSize && y >= 0 && y < ySize; } public boolean isInBounds(Point2D p){ return isInBounds((int)p.x, (int)p.y); } <BUG>public void setAll(E value){ </BUG> values.clear(); for (int i = 0; i < xSize*ySize; i++) values.add(value);
private void setAllAs(E value){
6,627
values.clear(); for (int i = 0; i < xSize*ySize; i++) values.add(value); } public List<E> getAll(){ <BUG>return values; }</BUG> public int getIndex(int x, int y){ return y*xSize+x; }
protected void setAll(List<E> values){ this.values = values;
6,628
import model.ModelManager; import model.battlefield.map.Map; import model.battlefield.map.Tile; import model.battlefield.map.cliff.Cliff; import model.battlefield.map.cliff.Ramp; <BUG>import model.battlefield.map.parcel.ParcelManager; import model.builders.entity.MapStyleBuilder;</BUG> import model.builders.entity.defi...
import model.builders.MapArtisan; import model.builders.entity.MapStyleBuilder;
6,629
} } LogUtil.logger.info(" map builders");</BUG> Battlefield res = new Battlefield(); <BUG>res.setMap(m); LogUtil.logger.info("Loading done.");</BUG> return res; } public Battlefield loadWithFileChooser() { final JFileChooser fc = new JFileChooser(ModelManager.DEFAULT_MAP_PATH);
public Battlefield getNew(int width, int height) { LogUtil.logger.info("Creating new battlefield..."); MapArtisan.buildMap(res); LogUtil.logger.info("Loading done.");
6,630
try { LogUtil.logger.info("Loading battlefield " + file.getCanonicalPath() + "..."); ObjectMapper mapper = new ObjectMapper(); // can reuse, share globally bField = mapper.readValue(file, Battlefield.class); bField.setFileName(file.getCanonicalPath()); <BUG>bField.getMap().atlas.finalize(); bField.getMap().cover.finali...
[DELETED]
6,631
pw.print( "=[" ); pw.print( component.getName() ); pw.println( "]" ); pw.println( " Bundle" + component.getBundle().getSymbolicName() + " (" + component.getBundle().getBundleId() + ")" ); <BUG>pw.println( " State=" + ComponentRenderAction.toStateString( component.getState() ) ); </BUG> pw.println( " DefaultState=" +...
pw.println( " State=" + ComponentsServlet.toStateString( component.getState() ) );
6,632
@SideOnly(Side.CLIENT) public class GuiSeedAnalyzer extends GuiContainer { public static final ResourceLocation texture = new ResourceLocation(Reference.MOD_ID, "textures/gui/GuiSeedAnalyzer.png"); public TileEntitySeedAnalyzer seedAnalyzer; private boolean journalOpen; <BUG>private GuiJournal guiJournal; </BUG> public...
private AgriGuiWrapper guiJournal;
6,633
return; } ItemStack journal = seedAnalyzer.getStackInSlot(ContainerSeedAnalyzer.journalSlotId); if(journal != null) { journalOpen = true; <BUG>guiJournal = new GuiJournal(journal); </BUG> guiJournal.setWorldAndResolution(this.mc, this.width, this.height); } }
guiJournal = new AgriGuiWrapper(new GuiJournal(journal));
6,634
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;
6,635
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;
6,636
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"),
6,637
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]
6,638
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) {
6,639
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;
6,640
Map<String, Object> _revisions = ClientTestUtils.getRevisionHistory(revision3, revision2, revision1); doc1.put(CouchConstants._rev, revision3); doc1.put(CouchConstants._revisions, _revisions); List<Response> responses = client.bulkCreateDocs(doc1); Assert.assertEquals(0, responses.size()); <BUG>Map<String, Object> allR...
Map<String, Object> allRevs = client.getDocRevisions(res1.getId(), revision3, JSONUtils.STRING_MAP_TYPE_DEF);
6,641
Assert.assertEquals("world", doc.get("hello")); Assert.assertTrue(doc.containsKey(CouchConstants._id)); Assert.assertEquals(res.getId(), doc.get(CouchConstants._id)); Assert.assertTrue(doc.containsKey(CouchConstants._rev)); Assert.assertEquals(res.getRev(), doc.get(CouchConstants._rev)); <BUG>} @Test(expected = NoResou...
[DELETED]
6,642
import com.cloudant.sync.internal.mazha.DocumentRevs; import com.cloudant.sync.internal.mazha.Response; <BUG>import com.cloudant.sync.internal.documentstore.InternalDocumentRevision; import com.cloudant.sync.internal.documentstore.DocumentRevsList; import com.cloudant.sync.internal.documentstore.MultipartAttachmentWrit...
[DELETED]
6,643
return executeResult; } finally { IOUtils.closeQuietly(errorStream); } } <BUG>private InputStream executeToInputStreamWithRetry(final Callable<ExecuteResult> task) throws CouchException { int attempts = 10; CouchException lastException= null; </BUG> while (attempts-- > 0) {
private <T> T executeWithRetry(final Callable<ExecuteResult> task, InputStreamProcessor<T> processor) throws CouchException lastException = null;
6,644
public boolean contains(String id) { Misc.checkNotNullOrEmpty(id, "id"); URI doc = this.uriHelper.documentUri(id); try { HttpConnection connection = Http.HEAD(doc); <BUG>this.executeToInputStreamWithRetry(connection); return true;</BUG> } catch (Exception e) { return false; }
this.executeWithRetry(connection, new NoOpInputStreamProcessor()); return true;
6,645
final URI doc = this.uriHelper.attachmentUri(id, queries, attachmentName); HttpConnection connection = Http.GET(doc); if (acceptGzip) { connection.requestProperties.put("Accept-Encoding", "gzip"); } <BUG>return executeToInputStreamWithRetry(connection); </BUG> } public void putAttachmentStream(String id, String rev, St...
return executeWithRetry(connection, processor);
6,646
} else { options.put("attachments", false); options.put("att_encoding_info", true); } options.put("open_revs", JSONUtils.toJson(revisions)); <BUG>return this.getDocument(id, options, JSONUtils.openRevisionList()); }</BUG> public Iterable<DocumentRevsList> bulkReadDocsWithOpenRevisions(List<BulkGetRequest> request, bool...
return this.getDocument(id, options, JSONUtils.OPEN_REVS_LIST_TYPE_DEF);
6,647
Misc.checkNotNull(rev, "Revision ID"); Map<String, Object> queries = new HashMap<String, Object>(); queries.put("revs", "true"); queries.put("rev", rev); URI findRevs = this.uriHelper.documentUri(id, queries); <BUG>InputStream is = null; try { HttpConnection connection = Http.GET(findRevs); is = this.executeToInputStre...
return executeToJsonObjectWithRetry(connection, type);
6,648
package com.cloudant.sync.internal.replication; import com.cloudant.http.HttpConnectionRequestInterceptor; import com.cloudant.http.HttpConnectionResponseInterceptor; <BUG>import com.cloudant.sync.internal.mazha.ChangesResult; import com.cloudant.sync.internal.mazha.CouchClient; import com.cloudant.sync.internal.mazha....
[DELETED]
6,649
attachmentName); if (a != null) { continue; } } <BUG>UnsavedStreamAttachment usa = this.sourceDb .getAttachmentStream(documentRevs.getId(), documentRevs.getRev(), attachmentName, contentType, encoding); preparedAtts.put(attachmentName, this.targetDb.prepareAttachment(usa, length, encodedLength)); }</BUG> }
preparedAtts.put(attachmentName, this.sourceDb.pullAttachmentWithRetry (documentRevs.getId(), documentRevs.getRev(), entry .getKey(), new AttachmentPullProcessor(this .targetDb, entry.getKey(), contentType, encoding, length, encodedLength)));
6,650
= new JButton(SystrayActivator.getResources().getI18NString("service.gui.OK")); private JButton cancelButton = new JButton( </BUG> SystrayActivator.getResources().getI18NString("service.gui.CANCEL")); <BUG>private JPanel buttonsPanel = new TransparentPanel(new FlowLayout(FlowLayout.RIGHT)); private ProtocolProviderServ...
import net.java.sip.communicator.util.swing.*; public class NewStatusMessageDialog extends SIPCommDialog implements ActionListener private final Logger logger = Logger.getLogger(NewStatusMessageDialog.class); private final JTextField messageTextField = new JTextField(); private final JButton cancelButton = new JButton(...
6,651
messagePanelConstraints.fill = GridBagConstraints.HORIZONTAL; messagePanelConstraints.gridx = 1; messagePanelConstraints.insets = new Insets(0, 0, 0, 0); messagePanelConstraints.weightx = 1; messagePanel.add(labelsPanel, messagePanelConstraints); <BUG>this.okButton.setName("ok"); this.cancelButton.setName("cancel"); th...
SystrayActivator.getResources().getI18nMnemonic("service.gui.OK"));
6,652
this.cancelButton.setName("cancel"); this.okButton.setMnemonic( SystrayActivator.getResources().getI18nMnemonic("service.gui.OK"));</BUG> this.cancelButton.setMnemonic( SystrayActivator.getResources().getI18nMnemonic("service.gui.CANCEL")); <BUG>this.okButton.addActionListener(this); this.cancelButton.addActionListener...
SystrayActivator.getResources().getI18nMnemonic("service.gui.OK")); JPanel buttonsPanel = new TransparentPanel(new FlowLayout(FlowLayout.RIGHT)); JPanel mainPanel = new TransparentPanel(new GridBagLayout());
6,653
private Boolean enableJaxbAnnotationModule; @XmlAttribute private String moduleClassNames; @XmlAttribute private String moduleRefs; <BUG>@XmlElement private Set<String> enableFeatures; @XmlElement private Set<String> disableFeatures; public JsonDataFormat() {</BUG> super("json");
private String enableFeatures; private String disableFeatures; public JsonDataFormat() {
6,654
public GetterExecutor(Field field, IFieldManipulator manipulator) { this.field = field; this.manipulator = manipulator; } @Override <BUG>public Object[] call(IConverter converter, Object target, Object... args) { Preconditions.checkArgument(args.length == 0, "Getter has no arguments"); final Object result = manipulato...
public Object[] call(IConverter converter, Object owner, Object... args) { final Object target = PropertyUtils.getContents(owner, field); final Object result = manipulator.getField(owner, target, field);
6,655
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;
6,656
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();
6,657
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: " +
6,658
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;
6,659
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()...
6,660
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;
6,661
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() {
6,662
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 FileSyste...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
6,663
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(...
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));
6,664
} 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()
6,665
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THR...
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.g...
6,666
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_...
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART...
6,667
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backup...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
6,668
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) ...
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
6,669
@Override public String getQueryString() { return buildQueryString().toString(); } @Override <BUG>public ByteBuffer[] getValues() { return null; }</BUG> @Override
public ByteBuffer[] getValues(int i) { public boolean hasValues() { return false;
6,670
package com.englishtown.vertx.cassandra; <BUG>import com.datastax.driver.core.MetricsOptions; import com.datastax.driver.core.PoolingOptions; import com.datastax.driver.core.QueryOptions; import com.datastax.driver.core.SocketOptions;</BUG> import com.datastax.driver.core.policies.LoadBalancingPolicy;
import com.datastax.driver.core.*;
6,671
@Override public String getQueryString() { return buildQueryString().toString(); } @Override <BUG>public ByteBuffer[] getValues() { return null; }</BUG> @Override
public ByteBuffer[] getValues(int i) { public boolean hasValues() { return false;
6,672
package com.englishtown.vertx.cassandra.impl; import com.datastax.driver.core.*; import com.datastax.driver.core.policies.*; <BUG>import com.englishtown.vertx.cassandra.CassandraConfigurator; import org.vertx.java.core.json.JsonArray;</BUG> import org.vertx.java.core.json.JsonObject; import org.vertx.java.platform.Cont...
import com.google.common.base.Strings; import org.vertx.java.core.json.JsonArray;
6,673
protected LoadBalancingPolicy loadBalancingPolicy; protected ReconnectionPolicy reconnectionPolicy; protected PoolingOptions poolingOptions; protected SocketOptions socketOptions; protected QueryOptions queryOptions; <BUG>protected MetricsOptions metricsOptions; public static final String CONFIG_SEEDS = "seeds";</BUG> ...
protected AuthProvider authProvider; public static final String CONFIG_SEEDS = "seeds";
6,674
initSeeds(config); initPolicies(config); initPoolingOptions(config); initSocketOptions(config); initQueryOptions(config); <BUG>initMetricsOptions(config); }</BUG> protected void initSeeds(JsonObject config) { JsonArray seeds = config.getArray(CONFIG_SEEDS); if (seeds == null || seeds.size() == 0) {
initAuthProvider(config); }
6,675
import org.junit.Test; import org.vertx.java.core.Context; import org.vertx.testtools.VertxAssert; public class CassandraSessionIntegrationTest extends IntegrationTestBase { @Test <BUG>public void testExecute() throws Exception { createKeyspace(); Statement create = TableBuilder.create(keyspace, "test") .column("id", "...
session.execute(createTestTableStatement);
6,676
VertxAssert.testComplete(); } @Test public void testExecuteAsync() throws Exception { final Context context = vertx.currentContext(); <BUG>session.executeAsync(createKeyspaceStatement, new FutureCallback<ResultSet>() { </BUG> @Override public void onSuccess(ResultSet result) { VertxAssert.assertEquals(context, vertx.cu...
session.executeAsync(createTestTableStatement, new FutureCallback<ResultSet>() {
6,677
<BUG>package com.englishtown.vertx.cassandra.impl; import com.datastax.driver.core.policies.DCAwareRoundRobinPolicy;</BUG> import com.datastax.driver.core.policies.LoadBalancingPolicy; import org.junit.Before; import org.junit.Test;
import com.datastax.driver.core.AuthProvider; import com.datastax.driver.core.PlainTextAuthProvider; import com.datastax.driver.core.policies.DCAwareRoundRobinPolicy;
6,678
import org.mockito.runners.MockitoJUnitRunner; import org.vertx.java.core.json.JsonObject; import org.vertx.java.platform.Container; import java.util.HashMap; import java.util.List; <BUG>import java.util.Map; import static org.junit.Assert.*;</BUG> import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.cla...
import static org.hamcrest.CoreMatchers.instanceOf; import static org.junit.Assert.*;
6,679
clusterBuilder.withQueryOptions(configurator.getQueryOptions()); } if (configurator.getMetricsOptions() != null) { if (!configurator.getMetricsOptions().isJMXReportingEnabled()) { clusterBuilder.withoutJMXReporting(); <BUG>} }</BUG> cluster = clusterBuilder.build(); reconnect(); }
if (configurator.getAuthProvider() != null) { clusterBuilder.withAuthProvider(configurator.getAuthProvider());
6,680
import org.vertx.java.core.logging.impl.LoggerFactory; import org.vertx.java.platform.Container; import javax.inject.Inject; public class EnvironmentCassandraConfigurator extends JsonCassandraConfigurator { public static final String ENV_VAR_SEEDS = "CASSANDRA_SEEDS"; <BUG>public static final String ENV_VAR_LOCAL_DC = ...
public static final String ENV_VAR_USERNAME = "CASSANDRA_USERNAME"; public static final String ENV_VAR_PASSWORD = "CASSANDRA_PASSWORD"; public static final Logger logger = LoggerFactory.getLogger(EnvironmentCassandraConfigurator.class);
6,681
int randomIndex = random.nextInt(defaultSkins.size()); final SkinData targetSkin = defaultSkins.get(randomIndex); if (targetSkin != null) { preferences.setTargetSkin(targetSkin); properties.clear(); <BUG>properties.put(ChangeSkinCore.SKIN_KEY, plugin.convertToProperty(targetSkin)); Bukkit.getScheduler().runTaskAsynchro...
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> plugin.getStorage().save(preferences));
6,682
ServerInfo target = connectEvent.getTarget(); List<String> blacklist = plugin.getConfig().getStringList("server-blacklist"); if (blacklist != null && !blacklist.contains(target.getName())) { final ProxiedPlayer player = connectEvent.getPlayer(); if (plugin.getLoginSession(player.getPendingConnection()) == null) { <BUG>...
ProxyServer.getInstance().getScheduler().runAsync(plugin, () -> onLazyLoad(player));
6,683
preferences.setTargetSkin(cachedSkin); save(cachedSkin, preferences); } } private void save(final SkinData skin, final UserPreference preferences) { <BUG>Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() { @Override public void run() {</BUG> if (plugin.getStorage().save(skin)) {
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
6,684
if (!defaultSkins.isEmpty()) { int randomIndex = random.nextInt(defaultSkins.size()); final SkinData targetSkin = defaultSkins.get(randomIndex); if (targetSkin != null) { preferences.setTargetSkin(targetSkin); <BUG>plugin.applySkin(player, targetSkin); ProxyServer.getInstance().getScheduler().runAsync(plugin, new Runna...
ProxyServer.getInstance().getScheduler().runAsync(plugin, () -> plugin.getStorage().save(preferences)); } } } public void save(final SkinData skin, final UserPreference preferences) { ProxyServer.getInstance().getScheduler().runAsync(plugin, () -> { if (plugin.getStorage().save(skin)) {
6,685
out.writeInteger(skinId); out.writeUTF(encodedData); out.writeUTF(encodedSignature); out.writeUTF(receiverUUID); }); <BUG>} else { plugin.getPluginChannel().sendTo(player, (out) -> { out.writeUTF("PermissionsFailure"); });</BUG> }
plugin.getPluginChannel().sendTo(player, out -> out.writeUTF("PermissionsFailure"));
6,686
refetchSkin(connection, playerName, loginEvent); } } private void refetchSkin(final PendingConnection conn, final String playerName , final AsyncEvent<?> loginEvent) { loginEvent.registerIntent(plugin); <BUG>ProxyServer.getInstance().getScheduler().runAsync(plugin, new Runnable() { @Override public void run() {</BUG> ...
ProxyServer.getInstance().getScheduler().runAsync(plugin, () -> {
6,687
import java.net.URL; import java.text.MessageFormat; import java.util.List; import java.util.Optional; import java.util.UUID; <BUG>import java.util.concurrent.ThreadFactory; import ninja.leaping.configurate.ConfigurationNode;</BUG> import ninja.leaping.configurate.yaml.YAMLConfigurationLoader; import org.slf4j.Logger; ...
import java.util.stream.Collectors; import ninja.leaping.configurate.ConfigurationNode;
6,688
} catch (Exception ex) { logger.error("Failed to setup database. Disabling plugin...", ex); return; } List<String> defaultSkins = Lists.newArrayList(); <BUG>for (ConfigurationNode node : rootNode.getNode("default-skins").getChildrenMap().values()) { defaultSkins.add(node.getString()); } core.loadDefaultSkins(defaultSki...
defaultSkins.addAll(rootNode.getNode("default-skins").getChildrenMap().values() .stream() .map(ConfigurationNode::getString).collect(Collectors.toList())); core.loadDefaultSkins(defaultSkins);
6,689
YAMLConfigurationLoader messageLoader = YAMLConfigurationLoader.builder().setFile(messageFile).build(); try { URL jarConfigFile = this.getClass().getResource("/messages.yml"); YAMLConfigurationLoader defaultLoader = YAMLConfigurationLoader.builder().setURL(jarConfigFile).build(); ConfigurationNode defaultRoot = default...
defaultRoot.getChildrenMap().values().stream().forEach((node) -> { }); messageNode.getChildrenMap().values().stream().forEach((node) -> { }); } catch (IOException ioEx) {
6,690
plugin.sendMessage(invoker, "skin-changed"); } } private void sendUpdate() { sendUpdateSelf(); <BUG>for (Player onlinePlayer : plugin.getGame().getServer().getOnlinePlayers()) { if (onlinePlayer.equals(receiver) || !onlinePlayer.canSee(receiver)) { continue; } onlinePlayer.offer(Keys.VANISH, true);</BUG> onlinePlayer.o...
plugin.getGame().getServer().getOnlinePlayers().stream() .filter(onlinePlayer -> onlinePlayer.equals(receiver)) .filter(onlinePlayer -> onlinePlayer.canSee(receiver)) .forEach(onlinePlayer -> { onlinePlayer.offer(Keys.VANISH, true);
6,691
package org.teachingextensions.WindowUtils; <BUG>import java.awt.BasicStroke; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; </BUG> import java.awt.geom.AffineTransform;
import org.teachingextensions.approvals.lite.util.ObjectUtils; import org.teachingextensions.logo.Turtle; import org.teachingextensions.logo.Turtle.Animals; import org.teachingextensions.logo.utils.ColorUtils.PenColors; import org.teachingextensions.logo.utils.LineAndShapeUtils.LineSegment; import java.awt.*;
6,692
</BUG> import java.awt.geom.AffineTransform; import java.awt.geom.Line2D; import java.util.ArrayList; import java.util.List; <BUG>import org.teachingextensions.approvals.lite.util.ObjectUtils; import org.teachingextensions.logo.Turtle; import org.teachingextensions.logo.Turtle.Animals; import org.teachingextensions.log...
package org.teachingextensions.WindowUtils; import org.teachingextensions.logo.utils.LineAndShapeUtils.LineSegment; import java.awt.*;
6,693
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 FileSyste...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
6,694
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(...
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));
6,695
} 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()
6,696
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THR...
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.g...
6,697
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_...
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART...
6,698
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backup...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
6,699
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) ...
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
6,700
coords.setFixedOrigin(false); coords.setFixedAngle(false); coords.setFixedScale(false); if (step == null) { step = (CalibrationStep)createStep(n, x, y); <BUG>if (step!=null) return step.getPoints()[index]; </BUG> } else {
return step==null? null: step.getPoints()[index];