id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
37,601 | coeff[dstOff + 1] = planeData[srcOff + 1] - dc;
coeff[dstOff + 2] = planeData[srcOff + 2] - dc;
coeff[dstOff + 3] = planeData[srcOff + 3] - dc;
}
}
<BUG>private final void takeSubtractUnsafe(int[] planeData, int planeWidth, int planeHeight, int x, int y, int[] coeff,
</BUG>
int dc) {
int outOff = 0;
int i;
| private final void takeSubtractUnsafe(byte[] planeData, int planeWidth, int planeHeight, int x, int y, int[] coeff,
|
37,602 | <BUG>package org.eclipse.jetty.servlets;
import org.eclipse.jetty.http.gzip.GzipResponseWrapper;</BUG>
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlets.gzip.GzipTester;
| import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.gzip.GzipResponseWrapper;
|
37,603 | FilterHolder holder = tester.setContentServlet(org.eclipse.jetty.servlet.DefaultServlet.class);
holder.setInitParameter("mimeTypes","text/plain");
try
{
tester.start();
<BUG>tester.assertIsResponseNotGzipCompressed("file.mp3", filesize);
}</BUG>
finally
{
| tester.assertIsResponseGzipCompressed("file.txt");
}
|
37,604 | if (_contentWritten == 0 && isResponse() && (_status < 200 || _status == 204 || _status == 304))
_contentLength = HttpTokens.NO_CONTENT;
else if (_last)
{
_contentLength = _contentWritten;
<BUG>if (content_length == null && (isResponse() || _contentLength>0 || content_type ))
</BUG>
{
_header.put(HttpHeaders.CONTENT_LE... | if (content_length == null && (isResponse() || _contentLength>0 || content_type ) && !_noContent)
|
37,605 | package org.eclipse.jetty.servlets;
import java.util.Arrays;
import java.util.List;
<BUG>import javax.servlet.Servlet;
import org.eclipse.jetty.http.gzip.GzipResponseWrapper;</BUG>
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlets.gzip.Gzip... | import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.gzip.GzipResponseWrapper;
|
37,606 | FilterHolder holder = tester.setContentServlet(testServlet);
holder.setInitParameter("mimeTypes","text/plain");
try
{
tester.start();
<BUG>tester.assertIsResponseNotGzipCompressed(filename,filesize);
</BUG>
}
finally
{
| tester.assertIsResponseGzipCompressed(filename);
|
37,607 | Pattern pat = Pattern.compile("^[0-9A-Fa-f]*");
Matcher mat = pat.matcher(contents);
Assert.assertTrue("Should have found HEX code in SHA1 file: " + sha1File,mat.find());
return mat.group();
}
<BUG>public void assertIsResponseNotGzipCompressed(String filename, int expectedFilesize) throws Exception
</BUG>
{
System.err.... | public void assertIsResponseNotGzipCompressed(String filename, int expectedFilesize, int status) throws Exception
|
37,608 | HttpTester request = new HttpTester();
HttpTester response = new HttpTester();
request.setMethod("GET");
request.setVersion("HTTP/1.0");
request.setHeader("Host","tester");
<BUG>request.setHeader("Accept-Encoding","gzip");
request.setURI("/context/" + filename);
ByteArrayBuffer reqsBuff = new ByteArrayBuffer(request.ge... | if (filename == null)
request.setURI("/context/");
else
request.setURI("/context/"+filename);
ByteArrayBuffer reqsBuff = new ByteArrayBuffer(request.generate().getBytes());
|
37,609 | Assert.assertEquals("Server contents",expected,actual);
}
finally
{
IO.close(out);
<BUG>IO.close(in);
}</BUG>
}
public String generateContent(int length)
{
| [DELETED] |
37,610 | return list.toArray(new PsiClass[list.size()]);
}
@Override
@NotNull
public String[] getAllClassNames() {
<BUG>final Collection<String> names = JavaShortClassNameIndex.getInstance().getAllKeys(myManager.getProject());
return ArrayUtil.toStringArray(names);</BUG>
}
@Override
| return ArrayUtil.toStringArray(JavaShortClassNameIndex.getInstance().getAllKeys(myManager.getProject()));
|
37,611 |
return ArrayUtil.toStringArray(names);</BUG>
}
@Override
public void getAllClassNames(@NotNull HashSet<String> set) {
<BUG>set.addAll(JavaShortClassNameIndex.getInstance().getAllKeys(myManager.getProject()));
}</BUG>
@Override
@NotNull
public PsiMethod[] getMethodsByName(@NotNull String name, @NotNull final GlobalSear... | return list.toArray(new PsiClass[list.size()]);
public String[] getAllClassNames() {
return ArrayUtil.toStringArray(JavaShortClassNameIndex.getInstance().getAllKeys(myManager.getProject()));
JavaShortClassNameIndex.getInstance().processAllKeys(myManager.getProject(), new CommonProcessors.CollectProcessor<String>(set));... |
37,612 | return StubIndex.getInstance().process(JavaStubIndexKeys.METHODS, name, myManager.getProject(), scope, processor);
}
@Override
@NotNull
public String[] getAllMethodNames() {
<BUG>final Collection<String> names = JavaMethodNameIndex.getInstance().getAllKeys(myManager.getProject());
return ArrayUtil.toStringArray(names)... | return ArrayUtil.toStringArray(JavaMethodNameIndex.getInstance().getAllKeys(myManager.getProject()));
|
37,613 |
return ArrayUtil.toStringArray(names);</BUG>
}
@Override
public void getAllMethodNames(@NotNull HashSet<String> set) {
<BUG>set.addAll(JavaMethodNameIndex.getInstance().getAllKeys(myManager.getProject()));
}</BUG>
@Override
@NotNull
public PsiField[] getFieldsByNameIfNotMoreThan(@NotNull String name, @NotNull final Gl... | return StubIndex.getInstance().process(JavaStubIndexKeys.METHODS, name, myManager.getProject(), scope, processor);
public String[] getAllMethodNames() {
return ArrayUtil.toStringArray(JavaMethodNameIndex.getInstance().getAllKeys(myManager.getProject()));
JavaMethodNameIndex.getInstance().processAllKeys(myManager.getPro... |
37,614 | package org.komodo.relational.commands.workspace;
<BUG>import static org.junit.Assert.assertEquals;
import org.junit.Test;</BUG>
import org.komodo.relational.commands.AbstractCommandTest;
import org.komodo.relational.vdb.Vdb;
import org.komodo.relational.workspace.WorkspaceManager;
| import java.io.File;
import org.junit.Test;
|
37,615 | private static final String UPLOAD_VDB = UploadVdbCommandTest.class.getClassLoader()
.getResource("AzureService-vdb.xml").getFile();</BUG>
@Test
public void shouldUploadVdb() throws Exception {
<BUG>final String[] commands = { "upload-vdb myVdb " + UPLOAD_VDB };
</BUG>
final CommandResult result = execute( commands );
... | import org.komodo.relational.commands.AbstractCommandTest;
import org.komodo.relational.vdb.Vdb;
import org.komodo.relational.workspace.WorkspaceManager;
import org.komodo.shell.api.CommandResult;
@SuppressWarnings( { "javadoc", "nls" } )
public final class UploadVdbCommandTest extends AbstractCommandTest {
private sta... |
37,616 | assertEquals("myVdb", vdbs[0].getName(getTransaction()));
}
@Test( expected = AssertionError.class )
public void shouldNotUploadVdbIfExists() throws Exception {
final String[] commands = { "create-vdb myVdb vdbPath ",
<BUG>"upload-vdb myVdb " + UPLOAD_VDB };
</BUG>
execute( commands );
}
@Test
| "upload-vdb myVdb " + UPLOAD_VDB.getAbsolutePath() };
|
37,617 | execute( commands );
}
@Test
public void shouldUploadVdbIfExistsWithOverwrite() throws Exception {
final String[] commands = { "create-vdb myVdb vdbPath ",
<BUG>"upload-vdb myVdb " + UPLOAD_VDB + " -o" };
</BUG>
final CommandResult result = execute( commands );
assertCommandResultOk(result);
WorkspaceManager wkspMgr = ... | "upload-vdb myVdb " + UPLOAD_VDB.getAbsolutePath() + " -o" };
|
37,618 | File tmpFile = File.createTempFile("unreadableFile", ".ddl");
Files.copy(ddlStream, tmpFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
tmpFile.deleteOnExit();
assertTrue(tmpFile.exists());
assertTrue(tmpFile.length() > 0);
<BUG>tmpFile.setReadable(false);
ImportMessages importMessages = new ImportMessages();</BUG... | if (! tmpFile.setReadable(false)) {
return;
}
ImportMessages importMessages = new ImportMessages();
|
37,619 | File tmpFile = File.createTempFile("unreadableFile", ".xml");
Files.copy(vdbStream, tmpFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
tmpFile.deleteOnExit();
assertTrue(tmpFile.exists());
assertTrue(tmpFile.length() > 0);
<BUG>tmpFile.setReadable(false);
ImportOptions importOptions = new ImportOptions();</BUG>
I... | if (! tmpFile.setReadable(false)) {
return;
}
ImportOptions importOptions = new ImportOptions();
|
37,620 | File tmpFile = File.createTempFile("unreadableFile", ".tds");
Files.copy(tdsStream, tmpFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
tmpFile.deleteOnExit();
assertTrue(tmpFile.exists());
assertTrue(tmpFile.length() > 0);
<BUG>tmpFile.setReadable(false);
ImportMessages importMessages = new ImportMessages();</BUG... | if (! tmpFile.setReadable(false)) {
return;
}
ImportMessages importMessages = new ImportMessages();
|
37,621 | final Arguments args = new Arguments( filePath );
this.playCmd = new PlayCommand( this.wsStatus );
this.playCmd.setArguments( args );
this.playCmd.setWriter( this.commandWriter );
}
<BUG>protected void setup(String folderName, String commandFileName) throws Exception {
ClassLoader classLoader = getClass().getClassLoade... | File file = getResourceFile(getClass(), folderName, commandFileName);
|
37,622 | package org.komodo.relational.commands.workspace;
<BUG>import static org.junit.Assert.assertEquals;
import org.junit.Test;</BUG>
import org.komodo.relational.commands.AbstractCommandTest;
import org.komodo.relational.datasource.Datasource;
import org.komodo.relational.workspace.WorkspaceManager;
| import java.io.File;
import org.junit.Test;
|
37,623 |
.getResource("dashboardDS.xml").getFile();</BUG>
@Test
public void shouldUploadDatasource() throws Exception {
<BUG>final String[] commands = { "upload-datasource " + UPLOAD_SOURCE };
</BUG>
final CommandResult result = execute( commands );
assertCommandResultOk(result);
WorkspaceManager wkspMgr = WorkspaceManager.get... | import org.komodo.relational.datasource.Datasource;
import org.komodo.relational.workspace.WorkspaceManager;
import org.komodo.shell.api.CommandResult;
@SuppressWarnings( { "javadoc", "nls" } )
public final class UploadDatasourceCommandTest extends AbstractCommandTest {
private static final File UPLOAD_SOURCE = getReso... |
37,624 | assertEquals("DashboardDS", sources[0].getName(getTransaction()));
}
@Test( expected = AssertionError.class )
public void shouldNotUploadDatasourceIfExists() throws Exception {
final String[] commands = { "create-datasource DashboardDS ",
<BUG>"upload-datasource " + UPLOAD_SOURCE };
</BUG>
execute( commands );
}
@Test
| "upload-datasource " + UPLOAD_SOURCE.getAbsolutePath() };
|
37,625 | execute( commands );
}
@Test
public void shouldUploadDatasourceIfExistsWithOverwrite() throws Exception {
final String[] commands = { "create-datasource DashboardDS ",
<BUG>"upload-datasource " + UPLOAD_SOURCE + " -o" };
</BUG>
final CommandResult result = execute( commands );
assertCommandResultOk(result);
WorkspaceMa... | "upload-datasource " + UPLOAD_SOURCE.getAbsolutePath() + " -o" };
|
37,626 | getSession().invalidate();
}
}
public static class Cookie {
public static void put(String key, Object value) {
<BUG>String strValue = CodecUtil.encodeUTF8(CastUtil.castString(value));
</BUG>
javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie(key, strValue);
getResponse().addCookie(cookie);
}
| String strValue = CodecUtil.encodeForUTF8(CastUtil.castString(value));
|
37,627 | T value = null;
javax.servlet.http.Cookie[] cookieArray = getRequest().getCookies();
if (ArrayUtil.isNotEmpty(cookieArray)) {
for (javax.servlet.http.Cookie cookie : cookieArray) {
if (key.equals(cookie.getName())) {
<BUG>value = (T) CodecUtil.decodeUTF8(cookie.getValue());
</BUG>
break;
}
}
| value = (T) CodecUtil.decodeForUTF8(cookie.getValue());
|
37,628 | e.printStackTrace();
}
filePlayback=null;
}
@Override
<BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); }
void initFiles() throws FileNotFoundException {</BUG>
if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed
String samples_str = dataDir ... | @Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; }
void initFiles() throws FileNotFoundException {
|
37,629 | public class BufferMonitor extends Thread implements FieldtripBufferMonitor {
public static final String TAG = BufferMonitor.class.toString();
private final Context context;
private final SparseArray<BufferConnectionInfo> clients = new SparseArray<BufferConnectionInfo>();
private final BufferInfo info;
<BUG>private fin... | [DELETED] |
37,630 | public static final String CLIENT_INFO_TIME = "c_time";
public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout";
public static final String CLIENT_INFO_CONNECTED = "c_connected";
public static final String CLIENT_INFO_CHANGED = "c_changed";
public static final String CLIENT_INFO_DIFF = "c_diff";
<BUG>publi... | public static final int THREAD_INFO_TYPE = 0;
|
37,631 | package nl.dcc.buffer_bci.bufferclientsservice;
import android.os.Parcel;
import android.os.Parcelable;
<BUG>import nl.dcc.buffer_bci.bufferservicecontroller.C;
public class ThreadInfo implements Parcelable {</BUG>
public static final Creator<ThreadInfo> CREATOR = new Creator<ThreadInfo>() {
@Override
public ThreadInfo... | import nl.dcc.buffer_bci.C;
public class ThreadInfo implements Parcelable {
|
37,632 | CHEVRON_RIGHT ("chevron-right", "png", false, false),
CHEVRON_LEFT ("chevron-left", "png", false, false),
SEARCH ("search", "png", false, false),
CONTROL_SLIDER_BALL ("control-sliderball", "png", false, false),
CONTROL_CHECK_ON ("control-check-on", "png", false, false),
<BUG>CONTROL_CHECK_OFF ("control-check-off", "png... | USER ("user", "user%d", "png", false, false),
ALPHA_MAP ("alpha", "png", false, false);
|
37,633 | GameImage(String filename, String type, boolean beatmapSkinnable, boolean preload) {
this.filename = filename;
this.type = getType(type);
this.beatmapSkinnable = beatmapSkinnable;
this.preload = preload;
<BUG>}
public boolean isBeatmapSkinnable() { return beatmapSkinnable; }</BUG>
public boolean isPreload() { return pr... | GameImage(String filename, String filenameFormat, String type, boolean beatmapSkinnable, boolean preload) {
this(filename, type, beatmapSkinnable, preload);
this.filenameFormat = filenameFormat;
public boolean isBeatmapSkinnable() { return beatmapSkinnable; }
|
37,634 | g.drawRect(0, yPos, rectWidth, rectHeight);
g.setLineWidth(oldLineWidth);
data.drawSymbolString(rankString, rectWidth, yPos, 1.0f, alpha * 0.2f, true);
white.a = blue.a = alpha * 0.75f;
if (playerName != null)
<BUG>Fonts.MEDIUMBOLD.drawString(xPaddingLeft, yPos + yPadding, playerName, white);
Fonts.DEFAULT.drawString(<... | Fonts.MEDIUM.drawString(xPaddingLeft, yPos + yPadding, playerName, white);
|
37,635 | int objectCount = hit300 + hit100 + hit50 + miss;
if (objectCount > 0)
percent = (hit300 * 300 + hit100 * 100 + hit50 * 50) / (objectCount * 300f) * 100f;
return percent;
}
<BUG>private float getScorePercent() {
</BUG>
return getScorePercent(
hitResultCount[HIT_300], hitResultCount[HIT_100],
hitResultCount[HIT_50], hit... | public float getScorePercent() {
|
37,636 | sd.score = slidingScore ? scoreDisplay : score;
sd.combo = comboMax;
sd.perfect = (comboMax == fullObjectCount);
sd.mods = GameMod.getModState();
sd.replayString = (replay == null) ? null : replay.getReplayFilename();
<BUG>sd.playerName = null; // TODO
return sd;</BUG>
}
public Replay getReplay(ReplayFrame[] frames, B... | sd.playerName = GameMod.AUTO.isActive() ?
UserList.AUTO_USER_NAME : UserList.get().getCurrentUser().getName();
return sd;
|
37,637 | return null;
replay = new Replay();
replay.mode = Beatmap.MODE_OSU;
replay.version = Updater.get().getBuildDate();
replay.beatmapHash = (beatmap == null) ? "" : beatmap.md5Hash;
<BUG>replay.playerName = ""; // TODO
replay.replayHash = Long.toString(System.currentTimeMillis()); // TODO</BUG>
replay.hit300 = (short) hi... | replay.playerName = UserList.get().getCurrentUser().getName();
replay.replayHash = Long.toString(System.currentTimeMillis()); // TODO
|
37,638 | import itdelatrisu.opsu.downloads.Download;
import itdelatrisu.opsu.downloads.DownloadNode;
import itdelatrisu.opsu.replay.PlaybackSpeed;
import itdelatrisu.opsu.ui.Colors;
import itdelatrisu.opsu.ui.Fonts;
<BUG>import itdelatrisu.opsu.ui.UI;
import java.awt.image.BufferedImage;</BUG>
import java.io.BufferedInputStream... | import itdelatrisu.opsu.user.UserButton;
import itdelatrisu.opsu.user.UserList;
import java.awt.image.BufferedImage;
|
37,639 | import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
<BUG>import android.net.Uri;
import android.os.Environment;</BUG>
import android.os.Handler;
import android.os.Vibrator;
import android.suppo... | import android.os.Build;
import android.os.Environment;
|
37,640 | public ControllerParent<MicShield> invalidate(
com.integreight.onesheeld.shields.ControllerParent.SelectionAction selectionAction,
boolean isToastable) {
this.selectionAction = selectionAction;
addRequiredPremission(Manifest.permission.RECORD_AUDIO);
<BUG>addRequiredPremission(Manifest.permission.WRITE_EXTERNAL_STORAGE... | if(Build.VERSION.SDK_INT >=16)
addRequiredPremission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
37,641 | package com.integreight.onesheeld.shields.controller;
import android.Manifest;
import android.app.Activity;
import android.media.MediaPlayer;
<BUG>import android.net.Uri;
import com.integreight.firmatabluetooth.ShieldFrame;</BUG>
import com.integreight.onesheeld.enums.UIShield;
import com.integreight.onesheeld.model.Pl... | import android.os.Build;
import com.integreight.firmatabluetooth.ShieldFrame;
|
37,642 | this.eventHandler = eventHandler;
}
@Override
public ControllerParent<MusicShield> invalidate(SelectionAction selectionAction, boolean isToastable) {
this.selectionAction = selectionAction;
<BUG>addRequiredPremission(Manifest.permission.WRITE_EXTERNAL_STORAGE);
addRequiredPremission(Manifest.permission.READ_EXTERNAL_ST... | if(Build.VERSION.SDK_INT >=16)
addRequiredPremission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
37,643 | import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
<BUG>import android.net.Uri;
import android.os.Environment;</BUG>
import android.os.Vibrator;
import android.support.v4.app.NotificationCompat;
import... | import android.os.Build;
import android.os.Environment;
|
37,644 | public void refresh() {
}
@Override
public ControllerParent<DataLoggerShield> invalidate(SelectionAction selectionAction, boolean isToastable) {
this.selectionAction =selectionAction;
<BUG>addRequiredPremission(Manifest.permission.WRITE_EXTERNAL_STORAGE);
addRequiredPremission(Manifest.permission.READ_EXTERNAL_STORAGE)... | if(Build.VERSION.SDK_INT >=16)
addRequiredPremission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
37,645 | package com.integreight.onesheeld.shields.controller;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
<BUG>import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.util.Base64;</BUG>
import android.widget.Toast;
import com.google.api.client.extens... | import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Build;
import android.util.Base64;
|
37,646 | import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
<BUG>import android.content.pm.PackageManager;
import android.os.Bundle;</BUG>
import android.os.Handler;
import android.os.IBinder;
import android.... | import android.os.Build;
import android.os.Bundle;
|
37,647 | if (isToastable)
activity.showToast("Camera is unavailable, maybe it's used by another application !");
} else {
addRequiredPremission(Manifest.permission.CAMERA);
addRequiredPremission(Manifest.permission.FLASHLIGHT);
<BUG>addRequiredPremission(Manifest.permission.WRITE_EXTERNAL_STORAGE);
addRequiredPremission(Manifes... | if(Build.VERSION.SDK_INT >=16)
addRequiredPremission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
37,648 | package com.integreight.onesheeld.shields.controller;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Matrix;
<BUG>import android.os.AsyncTask;
import android.os.Bundle;</BUG>
import android.support.v4.app.Fragment;
import android.widget.Toast;
import com.facebook.AccessToken;
| import android.Manifest;
import android.os.Build;
import android.os.Bundle;
|
37,649 | import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.graphics.Bitmap;
import android.graphics.Matrix;
<BUG>import android.os.AsyncTask;
import android.os.Handler;</BUG>
import android.os.Looper;
import android.widget.Toast;
import com.... | import android.os.Build;
import android.os.Handler;
|
37,650 | import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
<BUG>import android.content.Intent;
import android.location.Location;</BUG>
import android.location.LocationManager;
import android.os.Bundle;
import android.su... | import android.content.pm.PackageManager;
import android.location.Location;
|
37,651 | package com.integreight.onesheeld.shields.controller;
<BUG>import android.app.Activity;
import android.util.Pair;</BUG>
import com.integreight.firmatabluetooth.ShieldFrame;
import com.integreight.onesheeld.enums.UIShield;
import com.integreight.onesheeld.model.InternetRequest;
| import android.Manifest;
import android.os.Build;
import android.util.Pair;
|
37,652 | 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() );
|
37,653 | 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_();
|
37,654 | 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 );
|
37,655 | 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 );
|
37,656 | 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_();
|
37,657 | 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_();
|
37,658 | 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_();
|
37,659 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
37,660 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
37,661 | }
@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);
|
37,662 | 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 != nu... | MemoEntry.COLUMN_ORDER + " ASC", null);
|
37,663 | 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(
|
37,664 | 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.A... | import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
37,665 | 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, EditMe... | public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
37,666 | 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) {
|
37,667 | 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;
|
37,668 | package com.rit.sucy.gui;
<BUG>import org.bukkit.Bukkit;
import java.awt.*;</BUG>
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.util.HashMap;
| import org.bukkit.util.Vector;
import java.awt.*;
|
37,669 | package com.rit.sucy.gui;
<BUG>import com.rit.sucy.reflect.Reflection;
import org.bukkit.map.MapCanvas;</BUG>
import org.bukkit.map.MapView;
import java.lang.reflect.Method;
public class MapBuffer extends MapImage
| import org.bukkit.Bukkit;
import org.bukkit.map.MapCanvas;
|
37,670 | public boolean fastDrawSupported()
{
return flagDirty != null || flagDirty2 != null;
}
public void drawTo(MapCanvas canvas)
<BUG>{
boolean fast = false;</BUG>
if (flagDirty != null)
{
try
| if (!this.dirty) return;
boolean fast = false;
|
37,671 | public void back(Player player)
{
if (!current.containsKey(player.getName())) return;
MapMenu c = current.get(player.getName());
if (c == root) return;
<BUG>current.put(player.getName(), c.getParent());
}</BUG>
public void next(Player player, MapMenu menu)
{
if (getMenu(player) == menu.getParent())
| setup(c.getParent(), player);
}
|
37,672 | public class MapImage
{
public static void init(){}
private byte[] data;
private int width;
<BUG>private int height;
public MapImage()</BUG>
{
this(128, 128);
}
| protected int offset;
public MapImage()
|
37,673 | }
public MapImage(int width, int height)
{
data = new byte[width * height];
this.width = width;
<BUG>this.height = height;
}</BUG>
public MapImage(URL url) throws IOException
{
Image img = ImageIO.read(url);
| public MapImage(int[] size)
this(size[0], size[1]);
|
37,674 | for (i = x, k = 0; i < maxX; i++, k++)
{
for (j = y; j < maxY; j++)
{
int source = k + (j - y) * img.width;
<BUG>if (i < this.width && i >= 0 && j < this.height && j >= 0 && img.data[source] != 0)
{</BUG>
data[i + j * width] = img.data[source];
}
}
| if (img.data[source] != 0)
|
37,675 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View customView = inflater.inflate(R.layout.custom_view,null);
Button dismissButton = (Button)customView.findViewById(R.id.custom_button);
<B... | final MaterialStyledDialog.Builder dialogHeader_1 = new MaterialStyledDialog.Builder(context)
|
37,676 | soi.getSharedObject().sendMessage("userJoin", list);
}
}
public void left(String room, Integer participant){
log.debug("Participant $user leaving");
<BUG>SharedObjectInfo soi = voiceRooms.get(room);
</BUG>
if (soi != null) {
List<String> list = new ArrayList<String>();
list.add(participant.toString());
| RoomInfo soi = voiceRooms.get(room);
|
37,677 | soi.getSharedObject().sendMessage("userLeft", list);
}
}
public void muted(String room, Integer participant, Boolean muted){
log.debug("Participant $user mute $muted");
<BUG>SharedObjectInfo soi = voiceRooms.get(room);
</BUG>
if (soi != null) {
List<String> list = new ArrayList<String>();
list.add(participant.toString(... | RoomInfo soi = voiceRooms.get(room);
|
37,678 | soi.getSharedObject().sendMessage("userMute", list);
}
}
public void talking(String room, Integer participant, Boolean talking){
log.debug("Participant $user talk $talking");
<BUG>SharedObjectInfo soi = voiceRooms.get(room);
</BUG>
if (soi != null) {
List<String> list = new ArrayList<String>();
list.add(participant.toS... | RoomInfo soi = voiceRooms.get(room);
|
37,679 | package org.bigbluebutton.webconference.voice.asterisk.konference;
<BUG>import org.bigbluebutton.webconference.voice.ConferenceListener;
</BUG>
import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceJoinEvent;
import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceL... | import org.bigbluebutton.webconference.voice.ConferenceServerListener;
|
37,680 | import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceMemberMuteEvent;
import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceMemberUnmuteEvent;
import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceStateEvent;
import org.bigbluebutton.w... | private ConferenceServerListener listener;
|
37,681 | 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
max... | 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
|
37,682 | 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 IndexColor... | 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++) {
|
37,683 | 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++) {
|
37,684 | 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
max... | 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
|
37,685 | 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 += l... | 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++) {
|
37,686 | 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
max... | 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
|
37,687 | 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 += l... | 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++) {
|
37,688 | 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
max... | 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
|
37,689 | 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 += lineS... | 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++) {
|
37,690 | 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
max... | 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
|
37,691 | 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 += l... | 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++) {
|
37,692 | 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
max... | 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
|
37,693 | 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 +=... | 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++) {
|
37,694 | </BUG>
import com.rackspace.papi.service.config.ConfigurationService;
import com.rackspace.papi.service.context.jndi.ServletContextHelper;
import java.io.IOException;
import javax.servlet.*;
<BUG>import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;</BUG>
import org.slf4j.Logger;
... | package com.rackspace.papi.components.identity.ip;
import com.rackspace.papi.components.identity.ip.config.IpIdentityConfig;
import com.rackspace.papi.filter.logic.impl.FilterLogicHandlerDelegate;
|
37,695 | final HeaderManager headerManager = filterDirector.requestHeaderManager();
final ExtractorResult<Object> userResult = keyedRegexExtractor.extract(request.getRequestURI());
filterDirector.setFilterAction(FilterAction.PASS);
if (userResult != null && !userResult.getResult().isEmpty()) {
final String user = userResult.get... | headerManager.appendHeader(PowerApiHeader.USER.toString(), user + quality);
headerManager.appendHeader(PowerApiHeader.GROUPS.toString(), group);
|
37,696 | </BUG>
import com.rackspace.papi.service.config.ConfigurationService;
import com.rackspace.papi.service.context.jndi.ServletContextHelper;
import java.io.IOException;
import javax.servlet.*;
<BUG>import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;</BUG>
import org.slf4j.Logger;
... | package com.rackspace.papi.components.identity.header;
import com.rackspace.papi.components.identity.header.config.HeaderIdentityConfig;
import com.rackspace.papi.filter.logic.impl.FilterLogicHandlerDelegate;
|
37,697 | </BUG>
import com.rackspace.papi.service.config.ConfigurationService;
import com.rackspace.papi.service.context.jndi.ServletContextHelper;
import java.io.IOException;
import javax.servlet.*;
<BUG>import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;</BUG>
import org.slf4j.Logger;
... | package com.rackspace.papi.components.identity.uri;
import com.rackspace.papi.components.identity.uri.config.UriIdentityConfig;
import com.rackspace.papi.filter.logic.impl.FilterLogicHandlerDelegate;
|
37,698 | package com.intellij.util.xml.impl;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.project.Project;
<BUG>import com.intellij.psi.xml.XmlElement;
import com.intellij.util.ArrayUtil;</BUG>
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.xml.DomElement;
import co... | import com.intellij.psi.xml.XmlTag;
import com.intellij.util.ArrayUtil;
|
37,699 | "\nparent=" + getParent() + ";\n" +
"xmlElementName=" + getXmlElementName());
}
@Override
public boolean isValid() {
<BUG>return super.isValid() && myTagQName.equals(getXmlTag().getName());
}</BUG>
public final void undefineInternal() {
final DomElement parent = getParent();
final XmlTag tag = getXmlTag();
| if (!super.isValid()) return false;
if (tag == null || !myTagQName.equals(tag.getName())) return false;
return true;
|
37,700 | import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.lang.reflect.Type;
public class CustomDomChildrenDescriptionImpl extends AbstractDomChildDescriptionImpl implements CustomDomChildrenDescription, AbstractCollectionChildDescription {
@Nullable private final JavaMethod myGetter;
<BUG>private s... | public static final NotNullFunction<DomInvocationHandler,List<XmlTag>> CUSTOM_TAGS_GETTER = new NotNullFunction<DomInvocationHandler, List<XmlTag>>() {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.