id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
1,301
<T> List<T> getColumn(String columnName); void addColumn(String columnName, List<?> column); void addColumn(int columnIndex, String columnName, List<?> column); void removeColumn(String columnName); void removeColumnAll(Collection<String> columnNames); <BUG>void addRow(Object row); void addRow(int rowIndex, Object row); void removeRow(int rowIndex); void removeRowAll(int... indices);</BUG> void convertColumn(String columnName, Class<?> targetType);
[DELETED]
1,302
void trimToSize(); int size(); Properties<String, Object> getProperties(); __<Object[]> __(); <T> __<T> __(Class<? extends T> rowClass); <BUG><T> __<T> __(IntFunction<? extends T> rowSupplier); void println();</BUG> static interface __<T> { <E> List<E> getColumn(Class<? extends E> columnType, int columnIndex); <E> List<E> getColumn(Class<? extends E> columnType, String columnName);
Builder<DataSet> __(Consumer<DataSet> func); void println();
1,303
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);
1,304
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 = "sketch.pde";</BUG> static final String EMPTY = " "; PdeEditorButtons buttons;
[DELETED]
1,305
userName = user; skOpen(path, name); } else { skNew(); } <BUG>} catch (Exception e) { skNew();</BUG> } } public void doPlay() {
userName = "default";
1,306
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);
1,307
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();
1,308
e2.printStackTrace(); } buttons.clear(); } public void doSave() { <BUG>handleSave(lastFile == null); </BUG> } public void doSaveAs() { handleSave(true);
handleSave(sketchName == null);
1,309
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;
1,310
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,
1,311
</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";
1,312
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");
1,313
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>");
1,314
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; for (int i = 0; i < bagelClasses.length; i++) {
new FileOutputStream(new File(appletDir, exportSketchName + ".jar"));
1,315
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, baseline); if (!boringUser) g.drawString(USER_TITLER, userTitleLeft, baseline);
boolean boringUser = editor.userName.equals("default");
1,316
public String apply(@Nonnull ComponentDto input) { return input.key(); } }); ValidateProjectsVisitor visitor = new ValidateProjectsVisitor(session, dbClient.componentDao(), settings.getBoolean(CoreProperties.CORE_PREVENT_AUTOMATIC_PROJECT_CREATION), modulesByKey); <BUG>visitor.visit(context.getRoot()); </BUG> if (!visitor.validationMessages.isEmpty()) { throw new IllegalArgumentException("Validation of project failed:\n o " + MESSAGES_JOINER.join(visitor.validationMessages)); }
visitor.visit(treeRootHolder.getRoot());
1,317
import java.util.Arrays; import java.util.List; import org.sonar.server.computation.container.ComputeEngineContainer; public class ComputationSteps { public List<Class<? extends ComputationStep>> orderedStepClasses() { <BUG>return Arrays.asList( BuildComponentTreeStep.class,</BUG> PopulateComponentsUuidAndKeyStep.class, ValidateProjectStep.class, ParseReportStep.class,
ReportExtractionStep.class, BuildComponentTreeStep.class,
1,318
import org.sonar.api.utils.log.Profiler; import org.sonar.core.issue.db.UpdateConflictResolver; import org.sonar.core.platform.ComponentContainer; import org.sonar.server.computation.ComputationService; import org.sonar.server.computation.ReportQueue; <BUG>import org.sonar.server.computation.activity.ActivityManager; import org.sonar.server.computation.batch.BatchReportReaderImpl; import org.sonar.server.computation.batch.ReportExtractor;</BUG> import org.sonar.server.computation.component.DbComponentsRefCache; import org.sonar.server.computation.component.TreeRootHolderImpl;
import org.sonar.server.computation.batch.BatchReportDirectoryHolderImpl;
1,319
return new DefaultPicoContainer(new OptInCaching(), lifecycleStrategy, parent.getPicoContainer()); } private static List componentClasses() { return Arrays.asList( ActivityManager.class, <BUG>ReportExtractor.class, BatchReportReaderImpl.class, TreeRootHolderImpl.class, PlatformLanguageRepository.class,</BUG> MeasureRepositoryImpl.class,
BatchReportDirectoryHolderImpl.class, PlatformLanguageRepository.class,
1,320
Debug.checkNull("mysql_connection", this.mysql_connection); return this.mysql_connection; } @Override public String toString () { <BUG>return "MySQLConnection[" + this.dataSource.getUrl() + " : " + this.dataSource.getURL() + "]"; }</BUG> @Override protected void finalize () throws Throwable { super.finalize();
return "MySQLConnection[" + this.mySQL.getUrl() + "]";
1,321
package com.jfixby.cmns.adopted.gdx.log; import com.badlogic.gdx.Application; import com.badlogic.gdx.Gdx; import com.jfixby.cmns.api.collections.EditableCollection; <BUG>import com.jfixby.cmns.api.collections.Map; import com.jfixby.cmns.api.log.LoggerComponent;</BUG> import com.jfixby.cmns.api.util.JUtils; public class GdxLogger implements LoggerComponent { public GdxLogger () {
import com.jfixby.cmns.api.err.Err; import com.jfixby.cmns.api.log.LoggerComponent;
1,322
public static final String PackageName = "app.version.package_name"; } public static final String VERSION_FILE_NAME = "version.json"; private static final long serialVersionUID = 6662721574596241247L; public String packageName; <BUG>public int major = -1; public int minor = -1; public VERSION_STAGE stage = null; public int build = -1; </BUG> public int versionCode = -1;
public String major = ""; public String minor = ""; public String build = "";
1,323
<BUG>package com.jfixby.cmns.db.mysql; import com.jfixby.cmns.api.debug.Debug;</BUG> import com.jfixby.cmns.api.log.L; import com.jfixby.cmns.db.api.DBComponent; import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
import java.sql.Connection; import java.sql.SQLException; import com.jfixby.cmns.api.debug.Debug;
1,324
} public MySQLTable getTable (final String name) { return new MySQLTable(this, name); } public MySQLConnection obtainConnection () { <BUG>final MySQLConnection connection = new MySQLConnection(this.dataSource); connection.open();</BUG> return connection; } public void releaseConnection (final MySQLConnection connection) {
public String getDBName () { return this.dbName; final MySQLConnection connection = new MySQLConnection(this); connection.open();
1,325
Element icon = pElement.getChild("icon"); setTagIcon(Integer.parseInt(icon.getText())); } catch (Exception e) { setTagIcon(-1); } <BUG>String equation = URLDecoder.decode(pElement.getChild("equation").getTextTrim(), "UTF-8"); sEquation = equation;</BUG> } catch (Exception ignored) { }
[DELETED]
1,326
boolean includeSuperClass = klass.getClassLoader() != null; Method[] methods = (includeSuperClass) ? klass.getMethods() : klass.getDeclaredMethods(); for (Method method1 : methods) { try { <BUG>Method method = method1; if (Modifier.isPublic(method.getModifiers())) { String name = method.getName(); </BUG> String key = "";
if (Modifier.isPublic(method1.getModifiers())) { String name = method1.getName();
1,327
} else if (name.startsWith("is")) { key = name.substring(2); } if (key.length() > 0 && Character.isUpperCase(key.charAt(0)) <BUG>&& method.getParameterTypes().length == 0) { </BUG> if (key.length() == 1) { key = key.toLowerCase(); } else if (!Character.isUpperCase(key.charAt(1))) {
&& method1.getParameterTypes().length == 0) {
1,328
key = key.toLowerCase(); } else if (!Character.isUpperCase(key.charAt(1))) { key = key.substring(0, 1).toLowerCase() + key.substring(1); } <BUG>Object result = method.invoke(bean, (Object[]) null); </BUG> map.put(key, wrap(result)); } }
Object result = method1.invoke(bean, (Object[]) null);
1,329
package de.tor.tribes.io; import de.tor.tribes.util.GlobalOptions; <BUG>import de.tor.tribes.util.ImageUtils; import java.awt.Graphics2D; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Image; import java.awt.Transparency;</BUG> import java.awt.image.BufferedImage;
import org.apache.log4j.Logger; import java.awt.*;
1,330
public static int ID_FORREST13 = 28; public static int ID_FORREST14 = 29; public static int ID_FORREST15 = 30; public static int ID_FORREST16 = 31; private static boolean valid = false; <BUG>public static void initialize() throws FileNotFoundException, Exception { try {</BUG> loadWorld(); } catch (Exception e) { valid = false;
public static void initialize() throws Exception { try {
1,331
} } public static boolean isValid() { return valid; } <BUG>private static void loadWorld() throws FileNotFoundException, Exception { try {</BUG> GZIPInputStream fin = new GZIPInputStream(new FileInputStream("world.dat.gz")); ByteBuffer bb = ByteBuffer.allocate(1000000); byte[] d = new byte[1024];
private static void loadWorld() throws Exception { try {
1,332
logger.error("Failed to read decoration file"); throw new Exception("Unable to read decoration file", e); } loadTextures(); } <BUG>public static void loadTextures() throws Exception { mTextures = new LinkedList<>();</BUG> cache.clear(); try { String skinId = GlobalOptions.getSkin().getSkinID();
public static void loadTextures() { mTextures = new LinkedList<>();
1,333
if (attack.isPossibleFake()) { </BUG> fakeCount++; a.setType(Attack.FAKE_TYPE); <BUG>} else if (attack.isPossibleSnob()) { </BUG> snobCount++; a.setType(Attack.SNOB_TYPE); a.setUnit(DataHolder.getSingleton().getUnitByPlainName("snob")); }
Attack a = new Attack(); a.setSource(att1.getSource()); a.setTarget(pTarget); a.setArriveTime(new Date(att1.getlArriveTime())); if (att1.isPossibleFake()) { } else if (att1.isPossibleSnob()) {
1,334
import java.awt.geom.Ellipse2D; import java.net.URLDecoder; import org.jdom.Element;</BUG> import de.tor.tribes.ui.windows.DSWorkbenchMainFrame; <BUG>import de.tor.tribes.util.bb.VillageListFormatter; import java.awt.Font; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.List;</BUG> public class Circle extends AbstractForm {
import java.util.List;
1,335
private Tribe winner = null; public int getCurrentAcceptance() { long time = timestamp; long diff = System.currentTimeMillis() / 1000 - time; double risePerHour = ServerSettings.getSingleton().getSpeed() * ServerSettings.getSingleton().getRiseSpeed(); <BUG>int rise = 25 + (int) Math.rint((diff / (60 * 60)) * risePerHour); return rise;</BUG> } public Village getVillage() {
return 25 + (int) Math.rint((diff / (60 * 60)) * risePerHour);
1,336
import java.awt.Stroke; import java.net.URLDecoder; import org.jdom.Element;</BUG> import de.tor.tribes.ui.windows.DSWorkbenchMainFrame; <BUG>import de.tor.tribes.util.bb.VillageListFormatter; import java.awt.AlphaComposite; import java.awt.Composite; import java.awt.Font; import java.awt.Polygon;</BUG> import java.awt.geom.AffineTransform;
package de.tor.tribes.types.drawing; import de.tor.tribes.types.ext.Village; import de.tor.tribes.ui.panels.MapPanel; import org.jdom.Element; import java.awt.*;
1,337
import java.awt.geom.Rectangle2D; import java.net.URLDecoder; import org.jdom.Element;</BUG> import de.tor.tribes.ui.windows.DSWorkbenchMainFrame; <BUG>import de.tor.tribes.util.bb.VillageListFormatter; import java.awt.Font; import java.awt.geom.Point2D; import java.awt.geom.RoundRectangle2D; import java.util.List;</BUG> public class Rectangle extends AbstractForm {
import java.util.List;
1,338
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class PatchUtils {
import java.text.DateFormat; import java.util.Date; import java.util.List;
1,339
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;
1,340
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MISC_FILES("misc-files"),
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
1,341
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VERSION: if(type == Patch.PatchType.CUMULATIVE) {
[DELETED]
1,342
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHexString(item.getContentHash())); } if(type != ModificationType.ADD) {
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
1,343
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> import java.util.List; @MessageBundle(projectCode = "JBAS") public interface PatchMessages {
import org.jboss.logging.annotations.Cause; import java.io.IOException;
1,344
package net.amygdalum.testrecorder.deserializers.matcher; import static java.util.Collections.emptyList; import static net.amygdalum.testrecorder.deserializers.Templates.asLiteral; import static net.amygdalum.testrecorder.deserializers.Templates.enumMatcher; import static net.amygdalum.testrecorder.deserializers.Templates.fieldAccess; <BUG>import static net.amygdalum.testrecorder.deserializers.Templates.sameInstanceMatcher; import static net.amygdalum.testrecorder.util.Types.baseType;</BUG> import static net.amygdalum.testrecorder.util.Types.parameterized; import static net.amygdalum.testrecorder.util.Types.wildcardExtends; import java.lang.reflect.Type;
import static net.amygdalum.testrecorder.deserializers.Templates.widening; import static net.amygdalum.testrecorder.util.Types.baseType;
1,345
import java.lang.reflect.Type; import org.hamcrest.Matcher; import org.hamcrest.Matchers; import net.amygdalum.testrecorder.deserializers.Computation; import net.amygdalum.testrecorder.deserializers.TypeManager; <BUG>import net.amygdalum.testrecorder.util.EnumMatcher; import net.amygdalum.testrecorder.values.SerializedEnum;</BUG> public class DefaultEnumAdaptor extends DefaultMatcherGenerator<SerializedEnum> implements MatcherGenerator<SerializedEnum> { @Override public Class<SerializedEnum> getAdaptedClass() {
import net.amygdalum.testrecorder.util.Types; import net.amygdalum.testrecorder.util.WideningMatcher; import net.amygdalum.testrecorder.values.SerializedEnum;
1,346
private static final String CALL_METHOD_CHAIN_STMT = "<base>.<methods;separator=\".\">;"; private static final String CALL_LOCAL_METHOD_STMT = "<method>(<arguments; separator=\", \">);"; private static final String RETURN_STMT = "return <value>;"; private static final String CAPTURE_EXCEPTION = "capture(() -> {<statements>}, <type>)"; private static final String GENERIC_TYPE = "$type$<$typeParam; separator=\", \"$>"; <BUG>private static final String GENERIC_OBJECT_MATCHER = "new GenericMatcher() {\n<fields; separator=\"\\n\">\n}.matching(<type : {type | <type>}; separator=\", \">)"; private static final String ENUM_MATCHER = "matchingEnum(<value>)";</BUG> private static final String RECURSIVE_MATCHER = "recursive(<type>)"; private static final String CONTAINS_IN_ORDER_MATCHER = "containsInOrder(<type>.class, <values; separator=\", \">)"; private static final String EMPTY_MATCHER = "empty()";
private static final String WIDENING_MATCHER = "widening(<value>)"; private static final String ENUM_MATCHER = "matchingEnum(<value>)";
1,347
import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import junit.framework.TestCase; import org.apache.commons.logging.Log; <BUG>import org.apache.commons.logging.LogFactory; public abstract class FUMLTest extends TestCase {</BUG> protected Log log = LogFactory.getLog(getClass().getName()); public FUMLTest() { }
import fUML.Semantics.Classes.Kernel.IntegerValue; import fUML.Semantics.Classes.Kernel.Value; import fUML.Semantics.Classes.Kernel.ValueList; import fUML.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue; public abstract class FUMLTest extends TestCase {
1,348
package org.modeldriven.fuml.test.builtin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.modeldriven.fuml.test.FUMLTestSetup; <BUG>import org.modeldriven.fuml.test.builtin.environment.InitTestEnvironment; import junit.framework.Test;</BUG> public class LinkCreatorTestCase extends BuiltInTest { private static Log log = LogFactory.getLog(LinkCreatorTestCase.class); public static Test suite() {
import fUML.Semantics.Classes.Kernel.ExtensionalValue; import fUML.Semantics.Classes.Kernel.ExtensionalValueList; import fUML.Semantics.Classes.Kernel.FeatureValue; import fUML.Semantics.Classes.Kernel.Value; import fUML.Semantics.CommonBehaviors.BasicBehaviors.ParameterValueList; import fUML.Syntax.Classes.Kernel.Classifier; import junit.framework.Test;
1,349
package org.modeldriven.fuml.test.builtin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.modeldriven.fuml.test.FUMLTestSetup; <BUG>import org.modeldriven.fuml.test.builtin.environment.InitTestEnvironment; import junit.framework.Test;</BUG> public class ConditionalNodeTestCase extends BuiltInTest { private static Log log = LogFactory.getLog(ConditionalNodeTestCase.class); public static Test suite() {
import fUML.Semantics.CommonBehaviors.BasicBehaviors.ParameterValueList; import junit.framework.Test;
1,350
package org.modeldriven.fuml.test.builtin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.modeldriven.fuml.test.FUMLTestSetup; <BUG>import org.modeldriven.fuml.test.builtin.environment.InitTestEnvironment; import junit.framework.Test;</BUG> public class FireAgainTestCase extends BuiltInTest { private static Log log = LogFactory.getLog(FireAgainTestCase.class); public static Test suite() {
import fUML.Semantics.CommonBehaviors.BasicBehaviors.ParameterValueList; import junit.framework.Test;
1,351
package org.modeldriven.fuml.test.builtin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.modeldriven.fuml.test.FUMLTestSetup; <BUG>import org.modeldriven.fuml.test.builtin.environment.InitTestEnvironment; import fUML.Syntax.Activities.IntermediateActivities.Activity; import fUML.Syntax.Classes.Kernel.Element; import fUML.Syntax.CommonBehaviors.Communications.Signal; import junit.framework.Test;</BUG> public class IsClassifiedTestCase extends BuiltInTest {
import fUML.Semantics.Classes.Kernel.BooleanValue; import fUML.Semantics.CommonBehaviors.BasicBehaviors.ParameterValueList; import junit.framework.Test;
1,352
package org.modeldriven.fuml.test.builtin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.modeldriven.fuml.test.FUMLTestSetup; <BUG>import org.modeldriven.fuml.test.builtin.environment.InitTestEnvironment; import junit.framework.Test;</BUG> public class ExpansionRegionTestCase extends BuiltInTest { private static Log log = LogFactory.getLog(ExpansionRegionTestCase.class); public static Test suite() {
import fUML.Semantics.CommonBehaviors.BasicBehaviors.ParameterValueList; import junit.framework.Test;
1,353
package org.modeldriven.fuml.test.builtin; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.modeldriven.fuml.test.FUMLTestSetup; <BUG>import org.modeldriven.fuml.test.builtin.environment.InitTestEnvironment; import junit.framework.Test;</BUG> public class LinkDestroyerTestCase extends BuiltInTest { private static Log log = LogFactory.getLog(LinkDestroyerTestCase.class); public static Test suite() {
import fUML.Semantics.Classes.Kernel.ExtensionalValue; import fUML.Semantics.Classes.Kernel.ExtensionalValueList; import fUML.Semantics.Classes.Kernel.FeatureValue; import fUML.Semantics.Classes.Kernel.Value; import fUML.Semantics.CommonBehaviors.BasicBehaviors.ParameterValueList; import fUML.Syntax.Classes.Kernel.Classifier; import junit.framework.Test;
1,354
public class ESUtils { private static final ObjectMapper mapper = new ObjectMapper(); private static final long UPDATE_TIME_OUT = 3000; private ESUtils() { } <BUG>public static void update(String index, String type, String id, Object object) throws ElasticsearchException, JsonProcessingException { Common.elasticsearchClient.</BUG> prepareUpdate(). setIndex(index).
public static void update(String index, String type, String id, Object object) throws ElasticsearchException, JsonProcessingException { Common.elasticsearchClient.
1,355
writeValueAsString(object). getBytes()). execute(). actionGet(); } <BUG>public static IndexResponse add(String index, String type, String id, Object object) throws JsonProcessingException { return Common.elasticsearchClient.prepareIndex(index, type)</BUG> .setSource(mapper.writeValueAsBytes(object)) .setId(id) .execute()
public static IndexResponse add(String index, String type, String id, Object object) return Common.elasticsearchClient.prepareIndex(index, type)
1,356
import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TimeZone; import java.util.concurrent.CopyOnWriteArrayList; <BUG>import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.index.IndexResponse; import org.elasticsearch.rest.RestStatus;</BUG> import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import org.elasticsearch.action.delete.DeleteResponse;
1,357
import il.co.topq.report.front.events.ExecutionDeletedEvent; import il.co.topq.report.front.events.ExecutionEndedEvent; import il.co.topq.report.front.events.MachineCreatedEvent; import il.co.topq.report.front.events.TestDetailsCreatedEvent; @Component <BUG>public class ESController { private final Logger log = LoggerFactory.getLogger(ESController.class);</BUG> private Map<Integer, List<ElasticsearchTest>> openTestsPerExecution; public static boolean enabled = true; public ESController() {
private static final String TEST_TYPE = "test"; private final Logger log = LoggerFactory.getLogger(ESController.class);
1,358
esTest.setScenarioProperties(new HashMap<String, String>(rootScenario.getScenarioProperties())); } if (testNode.getParent() != null) { esTest.setParent(testNode.getParent().getName()); } <BUG>ESUtils.update(Common.ELASTIC_INDEX, "test", esTest.getUid(), esTest); </BUG> } } } catch (Exception e) {
ESUtils.update(Common.ELASTIC_INDEX, TEST_TYPE, esTest.getUid(), esTest);
1,359
if (testDetails.getProperties() != null) { if (currentTest.getProperties() == null || currentTest.getProperties().size() != testDetails.getProperties().size()) { currentTest.setProperties(testDetailsCreatedEvent.getTestDetails().getProperties()); try { <BUG>ESUtils.update(Common.ELASTIC_INDEX, "test", currentTest.getUid(), currentTest); </BUG> } catch (ElasticsearchException | JsonProcessingException e) { log.error("Failed updating test details in the Elasticsearch", e); }
ESUtils.update(Common.ELASTIC_INDEX, TEST_TYPE, currentTest.getUid(), currentTest);
1,360
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.util.DataStoreUtils; import de.vanita5.twittnuker.util.ImagePreloader;</BUG> import de.vanita5.twittnuker.util.InternalTwitterContentUtils; import de.vanita5.twittnuker.util.JsonSerializer; import de.vanita5.twittnuker.util.NotificationManagerWrapper;
import de.vanita5.twittnuker.util.DebugLog; import de.vanita5.twittnuker.util.ImagePreloader;
1,361
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);
1,362
@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.getException()); }</BUG> }
public UserKey[] getAccountKeys() { return DataStoreUtils.getActivatedAccountKeys(context);
1,363
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);
1,364
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.format("Unable to delete %s", file)); }</BUG> }
if (deleteImage) { Utils.deleteMedia(context, imageUri);
1,365
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, String.format("Unable to delete %s", file)); }</BUG> }
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
1,366
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.format("Unable to delete %s", file)); }</BUG> }
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
1,367
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.fragment.AbsStatusesFragment; import org.mariotaku.sqliteqb.library.AllColumns;</BUG> import org.mariotaku.sqliteqb.library.Columns; import org.mariotaku.sqliteqb.library.Columns.Column; import org.mariotaku.sqliteqb.library.Expression;
import org.mariotaku.pickncrop.library.PNCUtils; import org.mariotaku.sqliteqb.library.AllColumns;
1,368
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());
1,369
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 SharedPreferencesWrapper mPreferences;
public class TwidereDns implements Dns, Constants {
1,370
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);
1,371
import static com.google.common.base.Throwables.propagate; import static com.google.common.collect.Iterables.transform; import static com.google.common.collect.Iterators.getLast; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.transform; <BUG>import static com.google.common.collect.Maps.uniqueIndex; </BUG> import static org.eclipse.jgit.lib.ObjectId.fromString; import static se.bjurr.gitchangelog.api.GitChangelogApiConstants.REF_MASTER; import static se.bjurr.gitchangelog.api.GitChangelogApiConstants.ZERO_COMMIT;
import static com.google.common.collect.Maps.newHashMap;
1,372
.clientID("your-client-id") .clientSecret("your-client-secret") .appURLScheme("your-app-url-scheme") .serverURL("your-spidserver-url") .signSecret("your-secret-sign-key") <BUG>.context(this) .build();</BUG> config.setDebugMode(true); SPiDClient.getInstance().configure(config); Uri data = getIntent().getData();
.debugMode(true) .context(getApplicationContext()) .build();
1,373
.clientID("your-client-id") .clientSecret("your-client-secret") .appURLScheme("your-app-url-scheme") .serverURL("your-spidserver-url") .signSecret("your-secret-sign-key") <BUG>.context(this) .build();</BUG> config.setDebugMode(true); SPiDClient.getInstance().configure(config); setupContentView();
.debugMode(true) .context(getApplicationContext()) .build();
1,374
SPiDConfiguration config = new SPiDConfigurationBuilder() .clientID("your-client-id") .clientSecret("your-client-secret") .appURLScheme("your-app-url-scheme") .serverURL("your-spidserver-url") <BUG>.context(this) .context(getApplicationContext())</BUG> .build(); config.setDebugMode(true); SPiDClient.getInstance().configure(config);
.debugMode(true) .context(getApplicationContext())
1,375
.clientID("your-client-id") .clientSecret("your-client-secret") .appURLScheme("your-app-url-scheme") .serverURL("your-spidserver-url") .signSecret("your-secret-sign-key") <BUG>.context(this) .build();</BUG> config.setDebugMode(true); SPiDClient.getInstance().configure(config); if (SPiDClient.getInstance().isAuthorized()) {
.debugMode(true) .context(getApplicationContext()) .build();
1,376
AVOID_RESLICE_INTERPOLATION=1<<29, KEEP_UNDO_BUFFERS=1<<30; public static final String OPTIONS = "prefs.options"; public static final String vistaHint = ""; // no longer used private static final int USE_SYSTEM_PROXIES=1<<0, USE_FILE_CHOOSER=1<<1, SUBPIXEL_RESOLUTION=1<<2, ENHANCED_LINE_TOOL=1<<3, SKIP_RAW_DIALOG=1<<4, <BUG>REVERSE_NEXT_PREVIOUS_ORDER=1<<5, AUTO_RUN_EXAMPLES=1<<6, SHOW_ALL_POINTS=1<<7; public static final String OPTIONS2 = "prefs.options2";</BUG> public static String separator = System.getProperty("file.separator"); public static boolean usePointerCursor;
REVERSE_NEXT_PREVIOUS_ORDER=1<<5, AUTO_RUN_EXAMPLES=1<<6, SHOW_ALL_POINTS=1<<7, DO_NOT_SAVE_WINDOW_LOCS=1<<8; public static final String OPTIONS2 = "prefs.options2";
1,377
public static boolean reverseNextPreviousOrder; public static boolean autoRunExamples = true; public static boolean showAllPoints; public static boolean setIJMenuBar = IJ.isMacOSX(); public static boolean alwaysOnTop; <BUG>public static boolean splineFitLines; static Properties ijPrefs = new Properties();</BUG> static Properties props = new Properties(ijPrefs); static String prefsDir; static String imagesURL;
public static boolean doNotSaveWindowLocations = true; static Properties ijPrefs = new Properties();
1,378
subPixelResolution = (options2&SUBPIXEL_RESOLUTION)!=0; enhancedLineTool = (options2&ENHANCED_LINE_TOOL)!=0; skipRawDialog = (options2&SKIP_RAW_DIALOG)!=0; reverseNextPreviousOrder = (options2&REVERSE_NEXT_PREVIOUS_ORDER)!=0; autoRunExamples = (options2&AUTO_RUN_EXAMPLES)!=0; <BUG>showAllPoints = (options2&SHOW_ALL_POINTS)!=0; }</BUG> static void saveOptions(Properties prefs) { int options = (usePointerCursor?USE_POINTER:0) + (antialiasedText?ANTIALIASING:0) + (interpolateScaledImages?INTERPOLATE:0) + (open100Percent?ONE_HUNDRED_PERCENT:0)
doNotSaveWindowLocations = (options2&DO_NOT_SAVE_WINDOW_LOCS)!=0; }
1,379
prefs.put(OPTIONS, Integer.toString(options)); int options2 = (useSystemProxies?USE_SYSTEM_PROXIES:0) + (useFileChooser?USE_FILE_CHOOSER:0) + (subPixelResolution?SUBPIXEL_RESOLUTION:0) + (enhancedLineTool?ENHANCED_LINE_TOOL:0) + (skipRawDialog?SKIP_RAW_DIALOG:0) + (reverseNextPreviousOrder?REVERSE_NEXT_PREVIOUS_ORDER:0) <BUG>+ (autoRunExamples?AUTO_RUN_EXAMPLES:0) + (showAllPoints?SHOW_ALL_POINTS:0); prefs.put(OPTIONS2, Integer.toString(options2));</BUG> } public static void set(String key, String text) { if (key.indexOf('.')<1)
+ (autoRunExamples?AUTO_RUN_EXAMPLES:0) + (showAllPoints?SHOW_ALL_POINTS:0) + (doNotSaveWindowLocations?DO_NOT_SAVE_WINDOW_LOCS:0); prefs.put(OPTIONS2, Integer.toString(options2));
1,380
if (value==null) return defaultValue; else return value.equals("true"); } <BUG>public static void saveLocation(String key, Point loc) { set(key, loc.x+","+loc.y);</BUG> } public static Point getLocation(String key) { String value = ijPrefs.getProperty(KEY_PREFIX+key);
if (!doNotSaveWindowLocations) set(key, loc.x+","+loc.y);
1,381
addExample(submenu, "Non-numeric Table", "Non-numeric_Table.ijm"); addExample(submenu, "Overlay", "Overlay.ijm"); addExample(submenu, "Stack Overlay", "Stack_Overlay.ijm"); addExample(submenu, "Array Functions", "Array_Functions.ijm"); addExample(submenu, "Dual Progress Bars", "Dual_Progress_Bars.ijm"); <BUG>addExample(submenu, "Grab Viridis Colormap", "Grab_Viridis_Colormap.ijm"); addExample(submenu, "Tool", "Circle_Tool.ijm"); submenu.addActionListener(listener);</BUG> menu.add(submenu);
submenu.addSeparator(); addExample(submenu, "Circle Tool", "Circle_Tool.ijm"); addExample(submenu, "Star Tool", "Star_Tool.ijm"); submenu.addActionListener(listener);
1,382
for (int x=0; x<width; x++) pixels[offset++] = ramp[x]; } break; case FILL_RANDOM: <BUG>fillRandomRGB(ip); </BUG> break; } ImagePlus imp = new ImagePlus(title, ip);
fillRandomByte(ip);
1,383
ed.evaluateScript(".js"); else if (isBeanShell) ed.evaluateScript(".bsh"); else if (isPython) ed.evaluateScript(".py"); <BUG>else IJ.runMacro(text);</BUG> } return true; }
else if (!name.contains("_Tool")) IJ.runMacro(text);
1,384
super(new float[vertices], new float[vertices], vertices, FREEROI); if (aspectRatio<0.0) aspectRatio = 0.0; if (aspectRatio>1.0) aspectRatio = 1.0; this.aspectRatio = aspectRatio; makeEllipse(x1, y1, x2, y2); <BUG>state = NORMAL; }</BUG> public EllipseRoi(int sx, int sy, ImagePlus imp) { super(sx, sy, imp); type = FREEROI;
bounds = null; }
1,385
case 0: x2 = ox; y2 = oy; break; case 1: <BUG>double dx = (xpf[handle[3]]+xbase) - ox; double dy = (ypf[handle[3]]+ybase) - oy; updateRatio(Math.sqrt(dx*dx+dy*dy), x1, y1, x2, y2);</BUG> break; case 2:
double dx = (xpf[handle[3]]+x) - ox; double dy = (ypf[handle[3]]+y) - oy; updateRatio(Math.sqrt(dx*dx+dy*dy), x1, y1, x2, y2);
1,386
case 2: x1 = ox; y1 = oy; break; case 3: <BUG>dx = (xpf[handle[1]]+xbase) - ox; dy = (ypf[handle[1]]+ybase) - oy; updateRatio(Math.sqrt(dx*dx+dy*dy), x1, y1, x2, y2);</BUG> break; }
dx = (xpf[handle[1]]+x) - ox; dy = (ypf[handle[1]]+y) - oy; updateRatio(Math.sqrt(dx*dx+dy*dy), x1, y1, x2, y2);
1,387
dy = ypf[0]-ypf[nPoints-1]; length += Math.sqrt(dx*dx*w2+dy*dy*h2); return length; } public double[] getParams() { <BUG>double xbase=x, ybase=y; if (bounds!=null) { xbase = bounds.x; ybase = bounds.y; }</BUG> double[] params = new double[5];
[DELETED]
1,388
xbase = bounds.x; ybase = bounds.y; }</BUG> double[] params = new double[5]; <BUG>params[0] = xpf[handle[2]]+xbase; params[1] = ypf[handle[2]]+ybase; params[2] = xpf[handle[0]]+xbase; params[3] = ypf[handle[0]]+ybase; params[4] = aspectRatio;</BUG> return params;
dy = ypf[0]-ypf[nPoints-1]; length += Math.sqrt(dx*dx*w2+dy*dy*h2); return length;
1,389
ip.setLut(((CompositeImage)this).getChannelLut(channel)); } if (win!=null && win instanceof StackWindow) ((StackWindow)win).updateSliceSelector(); if ((Prefs.autoContrast||IJ.shiftKeyDown()) && nChannels==1 && imageType!=COLOR_RGB) { <BUG>(new ContrastEnhancer()).stretchHistogram(ip,0.35,ip.getStatistics()); ContrastAdjuster.update();</BUG> } if (imageType==COLOR_RGB) ContrastAdjuster.update();
(new ContrastEnhancer()).stretchHistogram(ip,0.35,ip.getStats());
1,390
private boolean hideCancelButton; private boolean centerDialog = true; private String helpURL; private String yesLabel, noLabel; private boolean smartRecording; <BUG>private Vector imagePanels; public GenericDialog(String title) {</BUG> this(title, getParentFrame()); } private static Frame getParentFrame() {
private static GenericDialog instance; public GenericDialog(String title) {
1,391
import java.awt.image.*; import javax.swing.ImageIcon; import javax.swing.JLabel; public class ImageJ extends Frame implements ActionListener, MouseListener, KeyListener, WindowListener, ItemListener, Runnable { <BUG>public static final String VERSION = "1.51h"; </BUG> public static final String BUILD = ""; public static Color backgroundColor = new Color(237,237,237); public static final Font SansSerif12 = new Font("SansSerif", Font.PLAIN, 12);
public static final String VERSION = "1.51j";
1,392
private final IGenerationTracer myGenerationTracer; private final IPerformanceTracer ttrace; private final DependenciesBuilder myDependenciesBuilder; private DeltaBuilder myDeltaBuilder; private boolean myInplaceModelChange = false; <BUG>private WeavingProcessor myWeavingProcessor; protected final boolean myInplaceChangeEnabled; // protected for PTG.registerAddedRoots protected List<SNode> myNewAddedRoots; // protected for PTG.registerAddedRoots</BUG> public TemplateGenerator(GenerationSessionContext operationContext, ProgressMonitor progressMonitor, RuleManager ruleManager, SModel inputModel, SModel outputModel,
private final boolean myInplaceChangeEnabled;
1,393
ttrace.push("apply delta changes", false); myInplaceModelChange = true; if (myDeltaBuilder.hasChanges()) { myDeltaBuilder.applyInplace(getInputModel(), this); } <BUG>if (myNewAddedRoots != null) { for (SNode newRoot : myNewAddedRoots) { getInputModel().addRootNode(newRoot); } myNewAddedRoots.clear(); }</BUG> myOutputRoots.clear();
[DELETED]
1,394
for (TemplateRootMappingRule rule : myRuleManager.getRoot_MappingRules()) { checkMonitorCanceled(); applyRootRule(rule, rootsConsumed); } ttrace.pop(); <BUG>if (myInplaceChangeEnabled) { if (myWeavingProcessor.hasWeavingRulesToApply()) { getLogger().info("Could have had delta builder here, but can't due to active weavings"); } else { getLogger().info("Active in-place model transformation"); myDeltaBuilder = createDeltaBuilder(); } }</BUG> checkMonitorCanceled();
[DELETED]
1,395
}</BUG> checkMonitorCanceled(); getGeneratorSessionContext().clearCopiedRootsSet(); for (SNode rootToCopy : myInputModel.getRootNodes()) { if (rootsConsumed.contains(rootToCopy)) { <BUG>if (myDeltaBuilder != null) { myDeltaBuilder.enterInputRoot(rootToCopy); myDeltaBuilder.deleteInputRoot(rootToCopy); myDeltaBuilder.leaveInputRoot(rootToCopy); }</BUG> continue;
for (TemplateRootMappingRule rule : myRuleManager.getRoot_MappingRules()) { applyRootRule(rule, rootsConsumed); } ttrace.pop();
1,396
return myIsStrict; } void setChanged() { myChanged = true; } <BUG>protected void registerAddedRoots(@NotNull Collection<SNode> newRoots) { if (!myInplaceChangeEnabled) { return; } if (myNewAddedRoots == null) { myNewAddedRoots = new ArrayList<SNode>(); } myNewAddedRoots.addAll(newRoots); }</BUG> protected void registerRoot(@NotNull SNode outputRoot, SNode inputNode, SNodeReference templateNode, boolean isCopied) {
[DELETED]
1,397
protected void registerRoot(@NotNull SNode outputRoot, SNode inputNode, SNodeReference templateNode, boolean isCopied) { myOutputRoots.add(outputRoot); myNewToOldRoot.put(outputRoot, inputNode); myDependenciesBuilder.registerRoot(outputRoot, inputNode); if (isCopied) { <BUG>getGeneratorSessionContext().registerCopiedRoot(outputRoot); }</BUG> } void rootReplaced(SNode old, SNode new_) { myDependenciesBuilder.rootReplaced(old, new_);
if (myDeltaBuilder != null) { myDeltaBuilder.registerRoot(inputNode, outputRoot);
1,398
Iterable<jetbrains.mps.openapi.editor.cells.EditorCell> cells) { if (editorComponent.isReadOnly()) { return true; } for (jetbrains.mps.openapi.editor.cells.EditorCell cell : cells) { <BUG>if (isCellOrSelectionReadOnlyInEditor(editorComponent, cell)) { return true;</BUG> } } return false;
if (cell == null || isCellReadOnly(cell)) {
1,399
import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl; import org.apache.sling.jcr.resource.internal.helper.MapEntries; import org.apache.sling.jcr.resource.internal.helper.Mapping; import org.apache.sling.performance.annotation.PerformanceTestSuite; <BUG>import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest; import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest; import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;</BUG> import org.junit.runner.RunWith;
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
1,400
@PerformanceTestSuite public ParameterizedTestList testPerformance() throws Exception { Helper helper = new Helper(); ParameterizedTestList testCenter = new ParameterizedTestList(); testCenter.setTestSuiteTitle("jcr.resource-2.0.10"); <BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper)); testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper)); </BUG> return testCenter;
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith10000VanityPathTest",helper, 100, 100)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWithManyAliasTest",helper, 1000)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith5000AliasTest",helper, 5000)); testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith10000AliasTest",helper, 10000));