id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
19,901
import java.util.List; import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.january.dataset.ShapeUtils; import org.eclipse.jface.operation.IRunnableWithProgress; <BUG>import org.eclipse.ui.progress.IProgressService; public class FileController { private static final FileController ...
public class FileController implements IFileController {
19,902
setCurrentDataOnFileChange(option); } private void setCurrentDataOnFileChange(DataOptions data) { currentData = data; fireStateChangeListeners(true,true); <BUG>} public void setCurrentData(DataOptions data, boolean selected) {</BUG> if (currentData == data && data.isSelected() == selected) return; currentData = data; d...
@Override public void setCurrentData(DataOptions data, boolean selected) {
19,903
if (currentFile == file) { currentFile = null; currentData = null; } fireStateChangeListeners(true, true); <BUG>} public void unloadFiles(List<LoadedFile> files){</BUG> for (LoadedFile file : files){ loadedFiles.unloadFile(file); if (currentFile == file) {
@Override public void unloadFiles(List<LoadedFile> files){
19,904
return checked; } private void fireStateChangeListeners(boolean file, boolean dataset) { FileControllerStateEvent e = new FileControllerStateEvent(this, file, dataset); for (FileControllerStateEventListener l : listeners) l.stateChanged(e); <BUG>} public List<DataStateObject> getImmutableFileState() {</BUG> List<DataSt...
@Override public List<DataStateObject> getImmutableFileState() {
19,905
package org.influxdb; import org.influxdb.impl.InfluxDBImpl; import com.google.common.base.Preconditions; import com.google.common.base.Strings; <BUG>import com.squareup.okhttp.OkHttpClient; import retrofit.client.Client; import retrofit.client.OkClient;</BUG> public enum InfluxDBFactory {
import okhttp3.OkHttpClient;
19,906
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Request; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.ResponseBuilder; import javax.ws.rs.core.Response.Status; <BUG>import javax.ws.rs.core.UriInfo; import net.openl10n.flies.common.LocaleId;</BUG> import net.openl10n.flies.common.Namespa...
import net.openl10n.flies.common.ContentState; import net.openl10n.flies.common.LocaleId;
19,907
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
19,908
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++) {
19,909
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++) {
19,910
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
19,911
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++) {
19,912
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
19,913
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++) {
19,914
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
19,915
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++) {
19,916
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
19,917
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++) {
19,918
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
19,919
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++) {
19,920
pending.fail(e); else fail(pending); } } <BUG>public void onFail(Throwable cause) </BUG> { while(true) {
public boolean onFail(Throwable cause)
19,921
break; default: if (DEBUG) LOG.debug("failed: {} {}", this, cause); if (updateState(current,new FailedState(cause))) <BUG>return; break;</BUG> } } }
return false;
19,922
package org.eclipse.jetty.io; import static org.hamcrest.Matchers.*; <BUG>import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.greaterThan;</BUG> import static org.hamcrest.Matchers.instanceOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse;
[DELETED]
19,923
import java.util.concurrent.TimeoutException; import org.eclipse.jetty.toolchain.test.AdvancedRunner; import org.eclipse.jetty.toolchain.test.annotation.Slow; import org.eclipse.jetty.util.BufferUtil; import org.eclipse.jetty.util.FutureCallback; <BUG>import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util...
[DELETED]
19,924
assertEquals(true,endp.flush()); assertEquals("some output some more",endp.getOutputString()); assertEquals(true,endp.flush(BufferUtil.EMPTY_BUFFER)); assertEquals("some output some more",endp.getOutputString()); assertEquals(true,endp.flush(BufferUtil.EMPTY_BUFFER,BufferUtil.toBuffer(" and"),BufferUtil.toBuffer(" more...
endp.close(); }
19,925
assertEquals(false,endp.flush(data)); assertEquals("Some more ",endp.getOutputString()); assertEquals("data.",BufferUtil.toString(data)); assertEquals("Some more ",endp.takeOutputString()); assertEquals(true,endp.flush(data)); <BUG>assertEquals("data.",BufferUtil.toString(endp.takeOutput())); }</BUG> @Test public void ...
endp.close(); }
19,926
package com.braintreepayments.api.internal; import android.content.Context; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; <BUG>import android.net.ConnectivityManager; import com.braintreepayments.api.Venmo;</BUG> import com.paypal.android.sdk.onetouch.core.Pay...
import android.net.NetworkInfo; import com.braintreepayments.api.Venmo;
19,927
menu.setEnabled(false); menubar.add(menu); menu = new Menu("Sketch"); menu.add(new MenuItem("Play")); menu.add(new MenuItem("Present")); <BUG>menu.add(new MenuItem("Stop")); menu.addActionListener(this);</BUG> menubar.add(menu); frame.setMenuBar(menubar); Insets insets = frame.getInsets();
menu.addSeparator(); menu.add(new MenuItem("Beautify")); menu.addActionListener(this);
19,928
import java.net.*; import java.util.*; import java.util.zip.*; public class PdeEditor extends Panel { static final String DEFAULT_PROGRAM = "// type program here\n"; <BUG>static final String NEW_SKETCH_ITEM = "( new sketch )"; static final String SKETCH_PREFIX_NAME = "sketch-"; static final String CODE_FILENAME = "sket...
[DELETED]
19,929
userName = user; skOpen(path, name); } else { skNew(); } <BUG>} catch (Exception e) { skNew();</BUG> } } public void doPlay() {
userName = "default";
19,930
sketchDir.mkdirs(); new File(sketchDir, "data").mkdirs(); new File(sketchDir, "build").mkdirs(); File sketchFile = new File(sketchDir, sketchName + ".pde"); new FileOutputStream(sketchFile); <BUG>handleOpen(sketchFile, sketchDir); </BUG> } catch (IOException e) { e.printStackTrace(); }
handleOpen(sketchName, sketchFile, sketchDir);
19,931
byte data[] = new byte[length]; int count = 0; while (count != length) { data[count++] = (byte) input.read(); } <BUG>textarea.setText(new String(data)); header.reset();</BUG> } catch (FileNotFoundException e1) { e1.printStackTrace(); } catch (IOException e2) {
sketchName = isketchName; sketchFile = isketchFile; sketchDir = isketchDir; header.reset();
19,932
e2.printStackTrace(); } buttons.clear(); } public void doSave() { <BUG>handleSave(lastFile == null); </BUG> } public void doSaveAs() { handleSave(true);
handleSave(sketchName == null);
19,933
public void doSaveAs() { handleSave(true); } protected void handleSave(boolean promptUser) { message("Saving file..."); <BUG>String s = textarea.getText(); String directory = lastDirectory; String filename = lastFile; System.out.println("1");</BUG> if (promptUser) {
String directory = sketchFile.getPath(); //lastDirectory; String filename = sketchFile.getName(); //lastFile;
19,934
buttons.clear(); return; } <BUG>handleExport(new File(directory), projectName, null); } protected void handleExport(File appletDir, String projectName, </BUG> File dataDir) { try { String program = textarea.getText();
} else if (project.indexOf(' ') != -1) { // space in filename message("Project name cannot have spaces."); handleExport(new File(directory), project, null); protected void handleExport(File appletDir, String exportSketchName,
19,935
</BUG> if (!engine.compileJava()) { return; } <BUG>String javaName = projectName + ".java"; </BUG> copyFile(new File(javaName), new File(appletDir, javaName)); int wide = BApplet.DEFAULT_WIDTH; int high = BApplet.DEFAULT_HEIGHT; int index = program.indexOf("size(");
File dataDir) { try { String program = textarea.getText(); KjcEngine engine = new KjcEngine(program, this); appletDir.mkdirs(); exportSketchName = engine.writeJava(exportSketchName, false); String javaName = exportSketchName + ".java";
19,936
PrintStream ps = new PrintStream(fos); ps.println("<HTML> <BODY BGCOLOR=\"white\">"); ps.println(); ps.println("<BR> <BR> <BR> <CENTER>"); ps.println(); <BUG>ps.print("<APPLET CODE=\"" + projectName + "\" ARCHIVE=\""); ps.print(projectName + ".jar"); </BUG> ps.println("\" WIDTH=" + wide + " HEIGHT=" + high + ">");
ps.print("<APPLET CODE=\"" + exportSketchName + "\" ARCHIVE=\""); ps.print(exportSketchName + ".jar");
19,937
ps.print(projectName + ".jar"); </BUG> ps.println("\" WIDTH=" + wide + " HEIGHT=" + high + ">"); ps.println("</APPLET>"); ps.println(); <BUG>ps.println("<A HREF=\"" + projectName + ".java\">source code</A>"); </BUG> ps.println(); ps.println("</CENTER>"); ps.println("</BODY> </HTML>");
PrintStream ps = new PrintStream(fos); ps.println("<HTML> <BODY BGCOLOR=\"white\">"); ps.println("<BR> <BR> <BR> <CENTER>"); ps.print("<APPLET CODE=\"" + exportSketchName + "\" ARCHIVE=\""); ps.print(exportSketchName + ".jar"); ps.println("<A HREF=\"" + exportSketchName + ".java\">source code</A>");
19,938
ps.close(); String exportDir = ("lib" + File.separator + "export" + File.separator); String bagelClasses[] = new File(exportDir).list(); FileOutputStream zipOutputFile = <BUG>new FileOutputStream(new File(appletDir, projectName + ".jar")); </BUG> ZipOutputStream zos = new ZipOutputStream(zipOutputFile); ZipEntry entry;...
new FileOutputStream(new File(appletDir, exportSketchName + ".jar"));
19,939
userTitleLeft = userLeft - PdeEditor.INSET_SIZE - metrics.stringWidth(USER_TITLER); int baseline = (sizeH + fontAscent) / 2; g.setColor(backgroundColor); g.fillRect(0, 0, imageW, imageH); <BUG>boolean boringUser = user.equals("default"); </BUG> g.setColor(secondaryColor); g.drawString(SKETCH_TITLER, sketchTitleLeft, ba...
boolean boringUser = editor.userName.equals("default");
19,940
lp.setSummary(R.string.billperiodid_help); lp.setCursor( getContentResolver().query(DataProvider.Plans.CONTENT_URI, DataProvider.Plans.PROJECTION_BASIC, DataProvider.Plans.WHERE_BILLPERIODS, null, null), <BUG>DataProvider.Plans.INDEX_ID, DataProvider.Plans.INDEX_NAME); </BUG> int i; if (c.isNull(DataProvider.Plans.INDE...
DataProvider.Plans.INDEX_ID, DataProvider.Plans.INDEX_NAME).close();
19,941
lp.setSummary(R.string.merge_plans_help); lp.setCursor( getContentResolver().query(DataProvider.Plans.CONTENT_URI, DataProvider.Plans.PROJECTION_BASIC, getMergePlansWhere(t), null, null), <BUG>DataProvider.Plans.INDEX_ID, DataProvider.Plans.INDEX_NAME); </BUG> lp.setValue(merged); ps.addPreference(lp); }
DataProvider.Plans.INDEX_ID, DataProvider.Plans.INDEX_NAME).close();
19,942
getString(R.string.sendlog_install_), getString(R.string.sendlog_install), getString(R.string.sendlog_run_), getString(R.string.sendlog_run)); return true; <BUG>} else if (k.equals("send_devices")) { final Intent intent = new Intent(Intent.ACTION_SEND);</BUG> intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_E...
case "send_devices": final Intent intent = new Intent(Intent.ACTION_SEND);
19,943
lp.setTitle(R.string.plan_); lp.setSummary(R.string.plan_help); lp.setCursor( getContentResolver().query(DataProvider.Plans.CONTENT_URI, DataProvider.Plans.PROJECTION_BASIC, getPlanWhere(w), null, null), <BUG>DataProvider.Plans.INDEX_ID, DataProvider.Plans.INDEX_NAME); </BUG> lp.setValue(c.getString(DataProvider.Rules....
DataProvider.Plans.INDEX_ID, DataProvider.Plans.INDEX_NAME).close();
19,944
import java.io.Writer; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Iterator; import java.util.List; <BUG>import java.util.StringTokenizer; import org.apache.maven.artifact.repository.ArtifactRepository;</BUG> import org.apache.maven.artifact.resolver.ArtifactNot...
import org.apache.maven.BuildFailureException; import org.apache.maven.artifact.repository.ArtifactRepository;
19,945
import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; import org.apache.maven.project.ProjectBuildingException; import org.apache.maven.settings.Settings; import org.codehaus.plexus.component.repository.ComponentRequirement; <BUG>import org.codehaus.plexus.component.reposito...
import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils;
19,946
public final void setVersion( String version ) { this.version = version; } private boolean describeCommand( StringBuffer descriptionBuffer ) <BUG>throws MojoFailureException {</BUG> if ( cmd.indexOf( ":" ) == -1 ) { try
throws MojoFailureException, MojoExecutionException
19,947
plugin = mojoDescriptor.getPluginDescriptor().getId(); return true; } private MojoDescriptor getMojoDescriptor( String task, MavenSession session, MavenProject project, String invokedVia, boolean canUsePrefix, boolean isOptionalMojo ) <BUG>throws MojoFailureException {</BUG> try { DefaultLifecycleExecutor lifecycleExec...
throws MojoFailureException, MojoExecutionException
19,948
"getMojoDescriptor", new Class[] { String.class, MavenSession.class, MavenProject.class, String.class, Boolean.TYPE, Boolean.TYPE } ); m.setAccessible( true ); <BUG>return (MojoDescriptor) m.invoke( lifecycleExecutor, new Object[] { task, session, project, invokedVia, Boolean.valueOf( canUsePrefix ), Boolean.valueOf( ...
MojoDescriptor mojoDescriptor = (MojoDescriptor) m.invoke( lifecycleExecutor, new Object[] { task, session, project, if ( mojoDescriptor == null )
19,949
if (resolvedSchemaLocation == null) { resolvedSchemaLocation = catalogs.getCatalog().resolveURI(start); }</BUG> if (resolvedSchemaLocation == null) { <BUG>resolvedSchemaLocation = catalogs.getCatalog().resolvePublic(start, base); }</BUG> } catch (Exception ex) { } return resolvedSchemaLocation; }
resolvedSchemaLocation = catalogs.resolveURI(start); resolvedSchemaLocation = catalogs.resolvePublic(start, base);
19,950
package org.apache.cxf.catalog; import java.io.File; import java.io.FileNotFoundException; <BUG>import java.io.IOException; import java.net.URISyntaxException;</BUG> import java.net.URL; import java.util.Collections; import java.util.Enumeration;
import java.net.MalformedURLException; import java.net.URISyntaxException;
19,951
catalogManager.debug.setDebug(Integer.parseInt(DEBUG_LEVEL)); } catalogManager.setUseStaticCatalog(false); catalogManager.setIgnoreMissingProperties(true); CatalogResolver catalogResolver = new CatalogResolver(catalogManager); <BUG>this.resolver = catalogResolver.getCatalog(); }</BUG> public Bus getBus() { return bus;...
return catalogResolver.getCatalog(); } catch (Throwable t) { return null;
19,952
if (null != bus) { bus.setExtension(this, OASISCatalogManager.class); } loadContextCatalogs(); } <BUG>public Catalog getCatalog() { return this.resolver; }</BUG> public void loadContextCatalogs() { loadContextCatalogs(DEFAULT_CATALOG_NAME);
[DELETED]
19,953
} catch (IOException e) { LOG.log(Level.WARNING, "Error loading " + name + " catalog files", e); } } public void loadCatalogs(ClassLoader classLoader, String name) throws IOException { <BUG>if (classLoader == null) { return;</BUG> } Enumeration<URL> catalogs = classLoader.getResources(name); while (catalogs.hasMoreElem...
if (classLoader == null || resolver == null) { return;
19,954
} Enumeration<URL> catalogs = classLoader.getResources(name); while (catalogs.hasMoreElements()) { URL catalogURL = catalogs.nextElement(); if (!loadedCatalogs.contains(catalogURL)) { <BUG>this.resolver.parseCatalog(catalogURL); </BUG> loadedCatalogs.add(catalogURL); } }
loadContextCatalogs(); public void loadContextCatalogs() { loadContextCatalogs(DEFAULT_CATALOG_NAME);
19,955
loadedCatalogs.add(catalogURL); } } } public void loadCatalog(URL catalogURL) throws IOException { <BUG>if (!loadedCatalogs.contains(catalogURL)) { </BUG> if ("file".equals(catalogURL.getProtocol())) { try { File file = new File(catalogURL.toURI());
if (!loadedCatalogs.contains(catalogURL) && resolver != null) {
19,956
import de.vanita5.twittnuker.receiver.NotificationReceiver; import de.vanita5.twittnuker.service.LengthyOperationsService; import de.vanita5.twittnuker.util.ActivityTracker; import de.vanita5.twittnuker.util.AsyncTwitterWrapper; import de.vanita5.twittnuker.util.DataStoreFunctionsKt; <BUG>import de.vanita5.twittnuker.u...
import de.vanita5.twittnuker.util.DebugLog; import de.vanita5.twittnuker.util.ImagePreloader;
19,957
final List<InetAddress> addresses = mDns.lookup(host); for (InetAddress address : addresses) { c.addRow(new String[]{host, address.getHostAddress()}); } } catch (final IOException ignore) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, ignore); }</BUG> }
DebugLog.w(LOGTAG, null, ignore);
19,958
@Override public void afterExecute(Bus handler, SingleResponse<Relationship> result) { if (result.hasData()) { handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData())); } else if (result.hasException()) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, "Unable to update friendship", result.getExcepti...
public UserKey[] getAccountKeys() { return DataStoreUtils.getActivatedAccountKeys(context);
19,959
MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId); if (!Utils.isOfficialCredentials(context, accountId)) continue; try { microBlog.setActivitiesAboutMeUnread(cursor); } catch (MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
19,960
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBannerImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.form...
if (deleteImage) { Utils.deleteMedia(context, imageUri);
19,961
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBackgroundImage(fileBody, tile); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, S...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
19,962
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); return twitter.updateProfileImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.for...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
19,963
import de.vanita5.twittnuker.annotation.CustomTabType; import de.vanita5.twittnuker.library.MicroBlog; import de.vanita5.twittnuker.library.MicroBlogException; import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus; import de.vanita5.twittnuker.library.twitter.model.Status; <BUG>import de.vanita5.twittnuker...
import org.mariotaku.pickncrop.library.PNCUtils; import org.mariotaku.sqliteqb.library.AllColumns;
19,964
context.getApplicationContext().sendBroadcast(intent); } } @Nullable public static Location getCachedLocation(Context context) { <BUG>if (BuildConfig.DEBUG) { Log.v(LOGTAG, "Fetching cached location", new Exception()); }</BUG> Location location = null;
DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
19,965
import java.util.List; import java.util.Map.Entry; import javax.inject.Singleton; import okhttp3.Dns; @Singleton <BUG>public class TwidereDns implements Constants, Dns { </BUG> private static final String RESOLVER_LOGTAG = "TwittnukerDns"; private final SharedPreferences mHostMapping; private final SharedPreferencesWra...
public class TwidereDns implements Dns, Constants {
19,966
for (Location location : twitter.getAvailableTrends()) { map.put(location); } return map.pack(); } catch (final MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
19,967
import java.util.Set; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; public class BeanConfigTest { <BUG>private final Set expectedKeys = new HashSet<String>(Arrays.asList("/packageA", "/packageB")); </BUG> private final Set<Scheme...
private final Set<?> expectedKeys = new HashSet<String>(Arrays.asList("/packageA", "/packageB"));
19,968
protected final ResolvedComponentResult module; public AbstractRenderableModuleResult(ResolvedComponentResult module) { this.module = module; } public ModuleComponentIdentifier getId() { <BUG>return module.getId(); } public String getName() { return module.getId().getGroup() + ":" + module.getId().getName() + ":" + mod...
return (ModuleComponentIdentifier)module.getId(); ModuleComponentIdentifier id = (ModuleComponentIdentifier)module.getId(); return id.getGroup() + ":" + id.getName() + ":" + id.getVersion();
19,969
} public boolean isResolvable() { return true; } public ModuleComponentSelector getRequested() { <BUG>return dependency.getRequested(); }</BUG> public ComponentSelectionReason getReason() { return dependency.getSelected().getSelectionReason(); }
return (ModuleComponentSelector)dependency.getRequested();
19,970
package org.gradle.api.reporting.dependencies.internal; import org.gradle.api.artifacts.ModuleIdentifier; <BUG>import org.gradle.api.artifacts.component.ModuleComponentIdentifier; import org.gradle.api.artifacts.result.DependencyResult;</BUG> import org.gradle.api.artifacts.result.ResolvedDependencyResult; import org.g...
import org.gradle.api.artifacts.component.ModuleComponentSelector; import org.gradle.api.artifacts.result.DependencyResult;
19,971
return matchesRequested(candidate) || matchesSelected((ResolvedDependencyResult) candidate); } else { return matchesRequested(candidate); } } <BUG>private boolean matchesRequested(DependencyResult candidate) { return candidate.getRequested().getGroup().equals(moduleIdentifier.getGroup()) && candidate.getRequested().ge...
ModuleComponentSelector requested = (ModuleComponentSelector)candidate.getRequested(); return requested.getGroup().equals(moduleIdentifier.getGroup()) && requested.getName().equals(moduleIdentifier.getName());
19,972
&& candidate.getRequested().getName().equals(moduleIdentifier.getName()); </BUG> } private boolean matchesSelected(ResolvedDependencyResult candidate) { <BUG>ModuleComponentIdentifier selected = candidate.getSelected().getId(); </BUG> return selected.getGroup().equals(moduleIdentifier.getGroup()) && selected.getName()...
return matchesRequested(candidate) || matchesSelected((ResolvedDependencyResult) candidate); } else { return matchesRequested(candidate); private boolean matchesRequested(DependencyResult candidate) { ModuleComponentSelector requested = (ModuleComponentSelector)candidate.getRequested(); return requested.getGroup().equa...
19,973
package org.gradle.api.tasks.diagnostics.internal.dsl; <BUG>import org.gradle.api.artifacts.component.ModuleComponentIdentifier; import org.gradle.api.artifacts.result.DependencyResult;</BUG> import org.gradle.api.artifacts.result.ResolvedDependencyResult; import org.gradle.api.specs.Spec; class DependencyResultSpec im...
import org.gradle.api.artifacts.component.ModuleComponentSelector; import org.gradle.api.artifacts.result.DependencyResult;
19,974
return matchesRequested(candidate) || matchesSelected((ResolvedDependencyResult) candidate); } else { return matchesRequested(candidate); } } <BUG>private boolean matchesRequested(DependencyResult candidate) { String requestedCandidate = candidate.getRequested().getGroup() + ":" + candidate.getRequested().getName() + "...
ModuleComponentSelector requested = (ModuleComponentSelector)candidate.getRequested(); String requestedCandidate = requested.getGroup() + ":" + requested.getName() + ":" + requested.getVersion();
19,975
String requestedCandidate = candidate.getRequested().getGroup() + ":" + candidate.getRequested().getName() + ":" + candidate.getRequested().getVersion(); </BUG> return requestedCandidate.contains(stringNotation); } private boolean matchesSelected(ResolvedDependencyResult candidate) { <BUG>ModuleComponentIdentifier sele...
return matchesRequested(candidate) || matchesSelected((ResolvedDependencyResult) candidate); } else { return matchesRequested(candidate); private boolean matchesRequested(DependencyResult candidate) { ModuleComponentSelector requested = (ModuleComponentSelector)candidate.getRequested(); String requestedCandidate = requ...
19,976
private final VersionMatcher matcher; private DependencyComparator(VersionMatcher matcher) { this.matcher = matcher; } public int compare(DependencyEdge left, DependencyEdge right) { <BUG>ModuleComponentSelector leftRequested = left.getRequested(); ModuleComponentSelector rightRequested = right.getRequested(); </BUG> ...
ModuleComponentSelector leftRequested = (ModuleComponentSelector)left.getRequested(); ModuleComponentSelector rightRequested = (ModuleComponentSelector)right.getRequested();
19,977
byVersion = matcher.compare(leftRequested.getVersion(), rightRequested.getVersion()); } if (byVersion != 0) { return byVersion; } <BUG>ModuleComponentIdentifier leftFrom = left.getFrom(); ModuleComponentIdentifier rightFrom = right.getFrom(); </BUG> byGroup = leftFrom.getGroup().compareTo(rightFrom.getGroup());
ModuleComponentIdentifier leftFrom = (ModuleComponentIdentifier)left.getFrom(); ModuleComponentIdentifier rightFrom = (ModuleComponentIdentifier)right.getFrom();
19,978
public class UnresolvedDependencyEdge implements DependencyEdge { private final UnresolvedDependencyResult dependency; private final ModuleComponentIdentifier actual; public UnresolvedDependencyEdge(UnresolvedDependencyResult dependency) { this.dependency = dependency; <BUG>ModuleComponentSelector attempted = dependenc...
ModuleComponentSelector attempted = (ModuleComponentSelector)dependency.getAttempted();
19,979
} public boolean isResolvable() { return false; } public ModuleComponentSelector getRequested() { <BUG>return dependency.getRequested(); }</BUG> public ModuleComponentIdentifier getActual() { return actual; }
return (ModuleComponentSelector)dependency.getRequested();
19,980
public class RenderableUnresolvedDependencyResult extends AbstractRenderableDependencyResult { private final ModuleComponentIdentifier actual; private final UnresolvedDependencyResult dependency; public RenderableUnresolvedDependencyResult(UnresolvedDependencyResult dependency) { this.dependency = dependency; <BUG>Modu...
ModuleComponentSelector attempted = (ModuleComponentSelector)dependency.getAttempted();
19,981
public boolean isResolvable() { return false; } @Override protected ModuleComponentSelector getRequested() { <BUG>return dependency.getRequested(); }</BUG> @Override protected ModuleComponentIdentifier getActual() { return actual;
return (ModuleComponentSelector)dependency.getRequested();
19,982
package org.gradle.api.tasks.diagnostics.internal.graph.nodes; <BUG>import org.gradle.api.artifacts.component.ModuleComponentIdentifier; import org.gradle.api.artifacts.component.ModuleComponentSelector; import org.gradle.api.artifacts.result.ComponentSelectionReason;</BUG> import java.util.Set; public interface Depend...
import org.gradle.api.artifacts.component.ComponentIdentifier; import org.gradle.api.artifacts.component.ComponentSelector; import org.gradle.api.artifacts.result.ComponentSelectionReason;
19,983
import org.gradle.api.artifacts.component.ModuleComponentSelector; import org.gradle.api.artifacts.result.ComponentSelectionReason;</BUG> import java.util.Set; public interface DependencyEdge { boolean isResolvable(); <BUG>ModuleComponentSelector getRequested(); ModuleComponentIdentifier getActual(); ModuleComponentIde...
package org.gradle.api.tasks.diagnostics.internal.graph.nodes; import org.gradle.api.artifacts.component.ComponentIdentifier; import org.gradle.api.artifacts.component.ComponentSelector; import org.gradle.api.artifacts.result.ComponentSelectionReason; ComponentSelectionReason getReason();
19,984
import com.liferay.portal.kernel.xml.XPath; import com.liferay.portal.test.EnvironmentExecutionTestListener; import com.liferay.portal.test.LiferayIntegrationJUnitTestRunner; import com.liferay.portal.test.TransactionalExecutionTestListener; import com.liferay.portal.util.PortalUtil; <BUG>import com.liferay.portal.util...
import com.liferay.portal.xml.XMLSchemaImpl; import com.liferay.portlet.documentlibrary.model.DLFolderConstants;
19,985
import com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureImpl; import com.liferay.portlet.dynamicdatamapping.service.BaseDDMServiceTestCase; import com.liferay.portlet.dynamicdatamapping.storage.Field; import com.liferay.portlet.dynamicdatamapping.storage.Fields; import com.liferay.portlet.dynamicdatamappin...
import com.liferay.portlet.dynamicdatamapping.util.DDMXMLImpl; import com.liferay.portlet.journal.model.JournalArticle;
19,986
register(PrimitiveUnaryOperationFIF.INSTANCE); register(PrimitiveBinaryOperationFIF.INSTANCE); register(StringOperationFIF.INSTANCE); register(ArrayFIF.INSTANCE); register(TopLevelFIF.INSTANCE); <BUG>register(NumberAndCharConversionFIF.INSTANCE$); }</BUG> private void register(@NotNull FunctionIntrinsicFactory instance...
register(ProgressionCompanionFIF.INSTANCE);
19,987
package org.jetbrains.kotlin.js.test.semantics; import org.jetbrains.kotlin.js.test.SingleFileTranslationTest; public final class RangeTest extends SingleFileTranslationTest { public RangeTest() { <BUG>super("range/"); }</BUG> public void testExplicitRange() throws Exception { fooBoxTest(); }
public void testCreatingProgressions() throws Exception {
19,988
public SModelDescriptor getStructureModelDescriptor() { if (getLanguageDescriptor().getStructureModel() != null) { SModelUID modelUID = SModelUID.fromString(getLanguageDescriptor().getStructureModel().getName()); SModelDescriptor structureModelDescriptor = SModelRepository.getInstance().getModelDescriptor(modelUID, thi...
LOG.error("Couldn't get structure model \"" + modelUID + "\""); } else if (!myRegisteredInFindUsagesManager) {
19,989
return null; } public SModelDescriptor getTypesystemModelDescriptor() { if (getLanguageDescriptor().getTypeSystem() != null) { SModelUID modelUID = SModelUID.fromString(getLanguageDescriptor().getTypeSystem().getName()); <BUG>return SModelRepository.getInstance().getModelDescriptor(modelUID, this); }</BUG> return null...
SModelDescriptor modelDescriptor = SModelRepository.getInstance().getModelDescriptor(modelUID, this); if (modelDescriptor == null) { LOG.errorWithTrace("Couldn't get typesystem model \"" + modelUID + "\""); return modelDescriptor;
19,990
if (stereotype == null) stereotype = SModelStereotype.NONE; String editorUID = getEditorUID(stereotype); if (editorUID == null) { return null; } <BUG>return SModelRepository.getInstance().getModelDescriptor(SModelUID.fromString(editorUID), this); }</BUG> public Set<SModelDescriptor> getEditorDescriptors() { Set<SModel...
SModelDescriptor modelDescriptor = SModelRepository.getInstance().getModelDescriptor(SModelUID.fromString(editorUID), this); if (modelDescriptor == null) { LOG.error("Couldn't get editor model \"" + editorUID + "\""); return modelDescriptor;
19,991
import org.opencms.main.CmsIllegalStateException; import org.opencms.main.CmsLog; import org.opencms.main.OpenCms; import org.opencms.report.I_CmsReport; import org.opencms.util.CmsStringUtil; <BUG>import org.opencms.workplace.commons.CmsProgressThread; import java.util.ArrayList;</BUG> import java.util.HashMap; import...
import org.opencms.xml.sitemap.CmsPublishSitemapCache; import java.util.ArrayList;
19,992
m_driverManager = driverManager; } public Map<String, List<CmsRelation>> validateResources( CmsDbContext dbc, CmsPublishList publishList, <BUG>I_CmsReport report) { CmsProgressThread thread = null;</BUG> if (Thread.currentThread() instanceof CmsProgressThread) { thread = (CmsProgressThread)Thread.currentThread(); }
I_CmsReport report) throws Exception { CmsProgressThread thread = null;
19,993
interpB.setROIdata(roiBounds, roiIter); if (nod == null) { nod = interpB.getNoDataRange(); } if (destNod == null) { <BUG>destNod = interpB.getDestinationNoData(); </BUG> } } if (nod != null) {
destNod = new double[]{interpB.getDestinationNoData()};
19,994
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
19,995
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
19,996
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
19,997
final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDa...
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
19,998
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
19,999
for (int k2 = 0; k2 < dst_num_bands; k2++) { int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]]; int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]]; int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>int w00 = byte...
int w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
20,000
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (byte) (intResult & 0xff); } } } else if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } if (fracx < fracdx1) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];