type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "private String escapeUnsafe(String s) {
s = s.replace("&", "&");
s = s.replace("<", "<");
s = s.replace(">", ">");
s = s.replace("\n", "<BR/>");
return s;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "escapeUnsafe" | "private String escapeUnsafe(String s) {
<MASK>s = s.replace("\n", "<BR/>");</MASK>
s = s.replace("&", "&");
s = s.replace("<", "<");
s = s.replace(">", ">");
return s;
}" |
Inversion-Mutation | megadiff | "public void end() {
_running.set(false);
_events.add(false);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "end" | "public void end() {
<MASK>_events.add(false);</MASK>
_running.set(false);
}" |
Inversion-Mutation | megadiff | "public SWTBotToolbarCheckboxButton toggle() {
log.debug(MessageFormat.format("Clicking on {0}", this)); //$NON-NLS-1$
assertEnabled();
internalToggle();
notify(SWT.MouseEnter);
notify(SWT.MouseMove);
notify(SWT.Activate);
notify(SWT.MouseDown);
notify(SWT.MouseUp);
notify(SWT.Selection);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "toggle" | "public SWTBotToolbarCheckboxButton toggle() {
log.debug(MessageFormat.format("Clicking on {0}", this)); //$NON-NLS-1$
assertEnabled();
notify(SWT.MouseEnter);
notify(SWT.MouseMove);
notify(SWT.Activate);
notify(SWT.MouseDown);
notify(SWT.MouseUp);
notify(SWT.Selection);
notify(SWT.MouseHove... |
Inversion-Mutation | megadiff | "public void startElement(String uri, String localName, String qName,
Attributes a) throws SAXException {
// Initialize string buffer to hold content of the new element.
// This will start a fresh buffer for every element encountered.
m_elementContent=new StringBuffer();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startElement" | "public void startElement(String uri, String localName, String qName,
Attributes a) throws SAXException {
// Initialize string buffer to hold content of the new element.
// This will start a fresh buffer for every element encountered.
m_elementContent=new StringBuffer();
... |
Inversion-Mutation | megadiff | "private void fireValueChange ( final DataItemValue.Builder builder )
{
injectAttributes ( builder );
this.sourceValue = builder.build ();
updateData ( this.sourceValue );
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "fireValueChange" | "private void fireValueChange ( final DataItemValue.Builder builder )
{
<MASK>this.sourceValue = builder.build ();</MASK>
injectAttributes ( builder );
updateData ( this.sourceValue );
}" |
Inversion-Mutation | megadiff | "protected ThreadState pickNextThread() {
//Set up an Iterator and go through it
Random randomGenerator = new Random();
int ticketCount = 0;
Iterator<ThreadState> itr = this.waitQueue.iterator();
while(itr.hasNext()) {
ticketCount += itr.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "pickNextThread" | "protected ThreadState pickNextThread() {
//Set up an Iterator and go through it
Random randomGenerator = new Random();
int ticketCount = 0;
Iterator<ThreadState> itr = this.waitQueue.iterator();
while(itr.hasNext()) {
ticketCount += itr.... |
Inversion-Mutation | megadiff | "protected int childCount(IThread thread) {
try {
int count = thread.getStackFrames().length;
if (isDisplayMonitors()) {
if (((IJavaDebugTarget)thread.getDebugTarget()).supportsMonitorInformation()) {
IJavaThread jThread = (IJavaThread) thread;
count += jThread.getOwnedMonitors().length;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "childCount" | "protected int childCount(IThread thread) {
try {
int count = thread.getStackFrames().length;
if (isDisplayMonitors()) {
if (((IJavaDebugTarget)thread.getDebugTarget()).supportsMonitorInformation()) {
IJavaThread jThread = (IJavaThread) thread;
count += jThread.getOwnedMonitors().length;
... |
Inversion-Mutation | megadiff | "public void setRelativeAxisVisible(boolean visibility)
{
this.isVisibleRelativeAxis = visibility;
canvas.lock();
marker.SetEnabled(Utils.booleanToInt(visibility));
relativeAxes.SetVisibility(Utils.booleanToInt(visibility));
canvas.RenderSecured();
canvas.unlock();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setRelativeAxisVisible" | "public void setRelativeAxisVisible(boolean visibility)
{
this.isVisibleRelativeAxis = visibility;
canvas.lock();
marker.SetEnabled(Utils.booleanToInt(visibility));
<MASK>canvas.unlock();</MASK>
relativeAxes.SetVisibility(Utils.booleanToInt(visibility));
canvas.RenderSecured();
}" |
Inversion-Mutation | megadiff | "public void close() {
if (closed == null) {
try {
closed = new Exception("Connection Closed Traceback");
shutdownConnection();
jcbcStorageClientConnection.releaseClient(this);
LOGGER.info("Sparse Content Map Database Connection ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close" | "public void close() {
if (closed == null) {
try {
shutdownConnection();
jcbcStorageClientConnection.releaseClient(this);
<MASK>closed = new Exception("Connection Closed Traceback");</MASK>
LOGGER.info("Sparse Content Map Databas... |
Inversion-Mutation | megadiff | "public static void mutate(Individual ind, double prob)
{
int mask = 1;
for (int i = 0; i < BITS; i++) {
double r = rand.nextDouble();
if (r < prob) {
ind.val ^= mask;
}
mask <<= 1;
}
ind.fitness(MIN_G);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mutate" | "public static void mutate(Individual ind, double prob)
{
int mask = 1;
for (int i = 0; i < BITS; i++) {
<MASK>mask <<= 1;</MASK>
double r = rand.nextDouble();
if (r < prob) {
ind.val ^= mask;
}
}
ind.fitness(MIN_G);
}" |
Inversion-Mutation | megadiff | "protected JPanel buildInfoPanel() {
JPanel pnl = new JPanel();
pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
pnl.setLayout(new GridBagLayout());
GridBagConstraints gc = new GridBagConstraints();
gc.fill = GridBagConstraints.BOTH;
gc.weighty = 1.0;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildInfoPanel" | "protected JPanel buildInfoPanel() {
JPanel pnl = new JPanel();
pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
pnl.setLayout(new GridBagLayout());
GridBagConstraints gc = new GridBagConstraints();
gc.fill = GridBagConstraints.BOTH;
gc.weighty = 1.0;
... |
Inversion-Mutation | megadiff | "@Test
public void testChannelAwareMessageListenerDontExpose() throws Exception {
ConnectionFactory mockConnectionFactory = mock(ConnectionFactory.class);
Connection mockConnection = mock(Connection.class);
final Channel firstChannel = mock(Channel.class);
when(firstChannel.isOpen()).thenReturn(true);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testChannelAwareMessageListenerDontExpose" | "@Test
public void testChannelAwareMessageListenerDontExpose() throws Exception {
ConnectionFactory mockConnectionFactory = mock(ConnectionFactory.class);
Connection mockConnection = mock(Connection.class);
final Channel firstChannel = mock(Channel.class);
when(firstChannel.isOpen()).thenReturn(true);
... |
Inversion-Mutation | megadiff | "@Override
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String ipAddressesList = nullToEmpty(request.getParameter("ipAddressesList"));
String getAllLogs = nullToEmpty(request.getParameter("getLogs"));
String clearLogs = nullToEmpt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doGet" | "@Override
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String ipAddressesList = nullToEmpty(request.getParameter("ipAddressesList"));
String getAllLogs = nullToEmpty(request.getParameter("getLogs"));
String clearLogs = nullToEmpt... |
Inversion-Mutation | megadiff | "@Override
protected void setup(Context context) throws IOException, InterruptedException {
_blurTask = BlurTask.read(context.getConfiguration());
_configuration = context.getConfiguration();
setupCounters(context);
setupZookeeper(context);
setupAnalyzer(context);
setupDirectory(context... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setup" | "@Override
protected void setup(Context context) throws IOException, InterruptedException {
_blurTask = BlurTask.read(context.getConfiguration());
setupCounters(context);
setupZookeeper(context);
setupAnalyzer(context);
setupDirectory(context);
setupWriter(context);
<MASK>_configu... |
Inversion-Mutation | megadiff | "public void clear () {
Object[] items = this.items;
for (int i = 0, n = size; i < n; i++)
items[i] = null;
size = 0;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "clear" | "public void clear () {
<MASK>size = 0;</MASK>
Object[] items = this.items;
for (int i = 0, n = size; i < n; i++)
items[i] = null;
}" |
Inversion-Mutation | megadiff | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createProject" | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... |
Inversion-Mutation | megadiff | "private void chartMouseMoved(java.awt.event.MouseEvent evt) {
int x = evt.getX();
int y = evt.getY();
if (x >= chartRect.x
&& x <= (chartRect.x + chartRect.width)
&& y >= chartRect.y
&& y <= (chartRect.y + chartRect.height)) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "chartMouseMoved" | "private void chartMouseMoved(java.awt.event.MouseEvent evt) {
int x = evt.getX();
int y = evt.getY();
if (x >= chartRect.x
&& x <= (chartRect.x + chartRect.width)
&& y >= chartRect.y
&& y <= (chartRect.y + chartRect.height)) {
... |
Inversion-Mutation | megadiff | "private void drawWord(int x, int y, ZLTextWord word, int start, int length, boolean addHyphenationSign) {
final ZLPaintContext context = getContext();
context.setColor(myTextStyle.getColor());
if ((start == 0) && (length == -1)) {
context.drawString(x, y, word.Data, word.Offset, word.Length);
} else ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "drawWord" | "private void drawWord(int x, int y, ZLTextWord word, int start, int length, boolean addHyphenationSign) {
final ZLPaintContext context = getContext();
if ((start == 0) && (length == -1)) {
<MASK>context.setColor(myTextStyle.getColor());</MASK>
context.drawString(x, y, word.Data, word.Offset, word.Lengt... |
Inversion-Mutation | megadiff | "private void initFromConfig() {
Properties props = new Properties();
try {
String aliasFileName = System.getProperty("alias.file");
if (aliasFileName != null) {
log.info("Reading from file " + aliasFileName);
props.load(new FileInputStream(aliasFileName));
reinit(props);
}
} catc... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initFromConfig" | "private void initFromConfig() {
Properties props = new Properties();
try {
String aliasFileName = System.getProperty("alias.file");
<MASK>log.info("Reading from file " + aliasFileName);</MASK>
if (aliasFileName != null) {
props.load(new FileInputStream(aliasFileName));
reinit(props);
}... |
Inversion-Mutation | megadiff | "@FireExtended
public void setDTG_Start(HiResDate newStart)
{
// check that we're still after the start of the host track
if(newStart.lessThan(this.getReferenceTrack().getStartDTG()))
{
newStart = this.getReferenceTrack().getStartDTG();
}
// ok, how far is this from the current end
long de... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setDTG_Start" | "@FireExtended
public void setDTG_Start(HiResDate newStart)
{
// check that we're still after the start of the host track
if(newStart.lessThan(this.getReferenceTrack().getStartDTG()))
{
newStart = this.getReferenceTrack().getStartDTG();
}
// ok, how far is this from the current end
long de... |
Inversion-Mutation | megadiff | "private void addDatabaseComponents() {
container.addSingleton(JdbcDriverHolder.class);
container.addSingleton(DryRunDatabase.class);
// mybatis
container.addSingleton(BatchDatabase.class);
container.addSingleton(MyBatis.class);
container.addSingleton(DatabaseVersion.class);
contain... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addDatabaseComponents" | "private void addDatabaseComponents() {
container.addSingleton(JdbcDriverHolder.class);
container.addSingleton(DryRunDatabase.class);
// mybatis
container.addSingleton(BatchDatabase.class);
container.addSingleton(MyBatis.class);
container.addSingleton(DatabaseVersion.class);
for (C... |
Inversion-Mutation | megadiff | "@Test
public void testUpgradeReadLockToOptimisticForceIncrement() throws Exception {
EntityManager em = getOrCreateEntityManager();
final EntityManager em2 = createIsolatedEntityManager();
try {
Lock lock = new Lock(); //
lock.setName( "name" );
em.getTransaction().begin(); // create the te... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testUpgradeReadLockToOptimisticForceIncrement" | "@Test
public void testUpgradeReadLockToOptimisticForceIncrement() throws Exception {
EntityManager em = getOrCreateEntityManager();
final EntityManager em2 = createIsolatedEntityManager();
try {
Lock lock = new Lock(); //
lock.setName( "name" );
em.getTransaction().begin(); // create the te... |
Inversion-Mutation | megadiff | "public void run() {
try {
em2.getTransaction().begin(); // start tx2
Lock lock2 = em2.getReference( Lock.class, id );
lock2.setName("renamed"); // change entity
}
finally {
em2.getTransaction().commit();
em2.close();
latch.countDown(); // signal that tx2... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
try {
em2.getTransaction().begin(); // start tx2
Lock lock2 = em2.getReference( Lock.class, id );
lock2.setName("renamed"); // change entity
}
finally {
em2.getTransaction().commit();
<MASK>latch.countDown(); // signal that tx2 is committed</... |
Inversion-Mutation | megadiff | "@Override
public void onAnimationEnd(Animation animation) {
mCurrentModeFrame.setVisibility(View.VISIBLE);
mModeSelectionFrame.setVisibility(View.GONE);
changeToSelectedMode();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onAnimationEnd" | "@Override
public void onAnimationEnd(Animation animation) {
<MASK>changeToSelectedMode();</MASK>
mCurrentModeFrame.setVisibility(View.VISIBLE);
mModeSelectionFrame.setVisibility(View.GONE);
}" |
Inversion-Mutation | megadiff | "@Override
public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {
try {
this.context = context;
classType = context.getTypeOracle().getType(typeName);
PrintWriter sourceWriter = context.tryCreate(logger... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "generate" | "@Override
public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {
try {
this.context = context;
classType = context.getTypeOracle().getType(typeName);
PrintWriter sourceWriter = context.tryCreate(logger... |
Inversion-Mutation | megadiff | "public void refresh(final ResourceTraversal[] traversals, int flags, IProgressMonitor monitor) throws CoreException {
SubscriberDiffTreeEventHandler handler = getHandler();
if (handler != null) {
GroupProgressMonitor group = getGroup(monitor);
if (group != null)
handler.setProgressGroupHint(group.ge... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "refresh" | "public void refresh(final ResourceTraversal[] traversals, int flags, IProgressMonitor monitor) throws CoreException {
SubscriberDiffTreeEventHandler handler = getHandler();
if (handler != null) {
GroupProgressMonitor group = getGroup(monitor);
if (group != null)
handler.setProgressGroupHint(group.ge... |
Inversion-Mutation | megadiff | "@Override
public void run() {
while (!done) {
Map<Lock,T> map = ((PessimisticLockManagerImpl)mgr).getLockStore();
System.out.println("Locks currently held at " + new Date() + ":");
for (Lock lock : map.keySet()) {
LockImpl<T> l = (LockImpl) lock;
System.out.println(l);
final long now = ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
while (!done) {
Map<Lock,T> map = ((PessimisticLockManagerImpl)mgr).getLockStore();
System.out.println("Locks currently held at " + new Date() + ":");
for (Lock lock : map.keySet()) {
LockImpl<T> l = (LockImpl) lock;
System.out.println(l);
final long now = ... |
Inversion-Mutation | megadiff | "private String takeScreenshotAndReturnFileName(ITestResult result) {
String imageName = screenshotFileNameFrom(result);
String imagePath = concat(output, separator, imageName);
try {
output.createIfNecessary();
screenshotTaker.saveDesktopAsPng(imagePath);
} catch (Exception e) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "takeScreenshotAndReturnFileName" | "private String takeScreenshotAndReturnFileName(ITestResult result) {
<MASK>output.createIfNecessary();</MASK>
String imageName = screenshotFileNameFrom(result);
String imagePath = concat(output, separator, imageName);
try {
screenshotTaker.saveDesktopAsPng(imagePath);
} catch (Exceptio... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_tag_activity);
if (savedInstanceState != null) {
mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1);
}
//... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_tag_activity);
if (savedInstanceState != null) {
mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1);
}
//... |
Inversion-Mutation | megadiff | "private void applySepia() {
if (mCurrentlyDisplayedBitmap != null) {
Bitmap tmp = ImageFilter.sepia(mCurrentlyDisplayedBitmap);
ivPicture.setImageBitmap(mCurrentlyDisplayedBitmap);
mCurrentlyDisplayedBitmap.recycle();
mCurrentlyDisplayedBitmap = tmp;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "applySepia" | "private void applySepia() {
if (mCurrentlyDisplayedBitmap != null) {
Bitmap tmp = ImageFilter.sepia(mCurrentlyDisplayedBitmap);
mCurrentlyDisplayedBitmap.recycle();
mCurrentlyDisplayedBitmap = tmp;
<MASK>ivPicture.setImageBitmap(mCurrentlyDisplayedBitmap);<... |
Inversion-Mutation | megadiff | "@Override
public boolean engine(GPSProblem myProblem, SearchStrategy myStrategy,
StatsHolder holder) {
boolean solutionFound = false;
while (!solutionFound) {
holder.resetStats();
solutionFound = super.engine(myProblem, myStrategy, holder);
depth++;
}
return solutionFound;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "engine" | "@Override
public boolean engine(GPSProblem myProblem, SearchStrategy myStrategy,
StatsHolder holder) {
boolean solutionFound = false;
while (!solutionFound) {
<MASK>depth++;</MASK>
holder.resetStats();
solutionFound = super.engine(myProblem, myStrategy, holder);
}
return solutionFound;
... |
Inversion-Mutation | megadiff | "public void endElement(final Object parent, final String tag, final Object node, final XMLElement attributes,
final String content) {
if (tag.equals("richcontent")) {
final String xmlText = content;
final Object typeAttribute = attributes.getAttribute(NodeTextBuilder.XML_NODE_XHTML_... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "endElement" | "public void endElement(final Object parent, final String tag, final Object node, final XMLElement attributes,
final String content) {
if (tag.equals("richcontent")) {
final String xmlText = content;
final Object typeAttribute = attributes.getAttribute(NodeTextBuilder.XML_NODE_XHTML_... |
Inversion-Mutation | megadiff | "public void switchLogFile() throws StandardException
{
boolean switchedOver = false;
/////////////////////////////////////////////////////
// Freeze the log for the switch over to a new log file.
// This blocks out any other threads from sending log
// record to the log stream.
//
// The swit... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "switchLogFile" | "public void switchLogFile() throws StandardException
{
boolean switchedOver = false;
/////////////////////////////////////////////////////
// Freeze the log for the switch over to a new log file.
// This blocks out any other threads from sending log
// record to the log stream.
//
// The swit... |
Inversion-Mutation | megadiff | "public void internalAbortWorkItem(long id) {
Environment env = this.kruntime.getEnvironment();
EntityManager em = (EntityManager) env.get(EnvironmentName.CMD_SCOPED_ENTITY_MANAGER);
WorkItemInfo workItemInfo = em.find(WorkItemInfo.class, id);
// work item may have been aborte... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "internalAbortWorkItem" | "public void internalAbortWorkItem(long id) {
Environment env = this.kruntime.getEnvironment();
EntityManager em = (EntityManager) env.get(EnvironmentName.CMD_SCOPED_ENTITY_MANAGER);
WorkItemInfo workItemInfo = em.find(WorkItemInfo.class, id);
// work item may have been aborte... |
Inversion-Mutation | megadiff | "public boolean isConditionTrue(String id, Properties variables)
{
Condition cond = getCondition(id);
if (cond == null)
{
Debug.trace("Condition (" + id + ") not found.");
return true;
}
else
{
cond.setInstalldata(install... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "isConditionTrue" | "public boolean isConditionTrue(String id, Properties variables)
{
Condition cond = getCondition(id);
<MASK>cond.setInstalldata(installdata);</MASK>
if (cond == null)
{
Debug.trace("Condition (" + id + ") not found.");
return true;
}
e... |
Inversion-Mutation | megadiff | "public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylar.tests");
//$JUnit-BEGIN$
suite.addTest(AllMonitorTests.suite());
suite.addTest(AllXmlTests.suite()); // HACK: first because it doesn't clean up properly
suite.addTest(AllCoreTests.sui... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "suite" | "public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylar.tests");
//$JUnit-BEGIN$
suite.addTest(AllMonitorTests.suite());
suite.addTest(AllXmlTests.suite()); // HACK: first because it doesn't clean up properly
<MASK>suite.addTest(AllJavaTest... |
Inversion-Mutation | megadiff | "Painter(Area area, double mag, Layer la, AffineTransform at) throws Exception {
super("AreaWrapper.Painter");
setPriority(Thread.NORM_PRIORITY);
this.la = la;
this.at = at;
this.at_inv = at.createInverse();
// if adding areas, make it be a copy, to be added on mouse release
// (In this way,... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Painter" | "Painter(Area area, double mag, Layer la, AffineTransform at) throws Exception {
super("AreaWrapper.Painter");
setPriority(Thread.NORM_PRIORITY);
this.la = la;
this.at = at;
this.at_inv = at.createInverse();
// if adding areas, make it be a copy, to be added on mouse release
// (In this way,... |
Inversion-Mutation | megadiff | "@Override
public void update(float deltaTime) {
List<TouchEvent> touchEvents = game.getInput().getTouchEvents();
game.getInput().getKeyEvents();
int len = touchEvents.size();
for(int i = 0; i < len; i++) {
TouchEvent event = touchEvents.get(i);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "update" | "@Override
public void update(float deltaTime) {
List<TouchEvent> touchEvents = game.getInput().getTouchEvents();
game.getInput().getKeyEvents();
int len = touchEvents.size();
for(int i = 0; i < len; i++) {
TouchEvent event = touchEvents.get(i);
... |
Inversion-Mutation | megadiff | "final void finishFullFlush(boolean success) {
assert setFlushingDeleteQueue(null);
if (success) {
// release the flush lock
flushControl.finishFullFlush();
} else {
flushControl.abortFullFlushes();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "finishFullFlush" | "final void finishFullFlush(boolean success) {
if (success) {
// release the flush lock
flushControl.finishFullFlush();
} else {
flushControl.abortFullFlushes();
}
<MASK>assert setFlushingDeleteQueue(null);</MASK>
}" |
Inversion-Mutation | megadiff | "public void run() {
startTime = System.currentTimeMillis();
if (DEBUG) System.out.println(jobType+" Job: "+jobName+" started");
ActivityLogger.logJobStarted(jobName, jobType, upCell, savedHighlights, savedHighlightsOffset);
try {
if (jobType != Type.EXAMINE) changingJob = t... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
startTime = System.currentTimeMillis();
if (DEBUG) System.out.println(jobType+" Job: "+jobName+" started");
ActivityLogger.logJobStarted(jobName, jobType, upCell, savedHighlights, savedHighlightsOffset);
try {
if (jobType == Type.CHANGE) Undo.startChanges(tool, ... |
Inversion-Mutation | megadiff | "protected int feedData() {
if(initFeed){
initFeed = false;
boolean feedResult;
if(learnAhead){
feedResult = dbHelper.getListItems(-1, learningQueueSize, learnQueue, 3, activeFilter);
}
else{
feedResult = dbHelper.getListI... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "feedData" | "protected int feedData() {
if(initFeed){
initFeed = false;
boolean feedResult;
if(learnAhead){
feedResult = dbHelper.getListItems(-1, learningQueueSize, learnQueue, 3, activeFilter);
}
else{
feedResult = dbHelper.getListI... |
Inversion-Mutation | megadiff | "public String[][] getUserNames() throws SQLException
{
String query="SELECT name, fullname from user_list;";
logger.debug("Running query: "+query);
stmt.executeQuery(query);
ResultSet rs = stmt.getResultSet();
ArrayList<String[]> als = new ArrayList<String[]>();
while(rs.next())
{
String[] ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getUserNames" | "public String[][] getUserNames() throws SQLException
{
String query="SELECT name, fullname from user_list;";
logger.debug("Running query: "+query);
stmt.executeQuery(query);
ResultSet rs = stmt.getResultSet();
ArrayList<String[]> als = new ArrayList<String[]>();
<MASK>String[] row = new String[2];<... |
Inversion-Mutation | megadiff | "public void turnOff(Player player, TurnOffReason reason) {
SPMPlayerSave spPlayerSave = spPlayersSave.remove(player);
spPlayerSave.restore(player);
player.setSleepingIgnored(false);
player.setNoDamageTicks(120);
if (isVanished(player)) {
turnOffVanish(play... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "turnOff" | "public void turnOff(Player player, TurnOffReason reason) {
<MASK>spPlayers.remove(player);</MASK>
SPMPlayerSave spPlayerSave = spPlayersSave.remove(player);
spPlayerSave.restore(player);
player.setSleepingIgnored(false);
player.setNoDamageTicks(120);
if (isVani... |
Inversion-Mutation | megadiff | "public void setUp() throws Exception {
super.setUp();
Locale.setDefault(Locale.US);
SimpleDateFormat dateFormat = new SimpleDateFormat(FitNesseContext.recentChangesDateFormat);
date = dateFormat.format(Clock.currentDate());
SimpleDateFormat rfcDateFormat = new SimpleDateFormat(FitNesseContext.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setUp" | "public void setUp() throws Exception {
super.setUp();
SimpleDateFormat dateFormat = new SimpleDateFormat(FitNesseContext.recentChangesDateFormat);
date = dateFormat.format(Clock.currentDate());
SimpleDateFormat rfcDateFormat = new SimpleDateFormat(FitNesseContext.rfcCompliantDateFormat);
rfcD... |
Inversion-Mutation | megadiff | "public static void fillInBreeding(IGenericCharacter character, Map<Object, Object> parameters) {
for (IGenericTrait background : character.getBackgrounds()) {
if (background.getType().getId().equals(DbCharacterModule.BACKGROUND_ID_BREEDING)) {
parameters.put(ICharacterReportConstants.BREEDING_VALU... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "fillInBreeding" | "public static void fillInBreeding(IGenericCharacter character, Map<Object, Object> parameters) {
for (IGenericTrait background : character.getBackgrounds()) {
if (background.getType().getId().equals(DbCharacterModule.BACKGROUND_ID_BREEDING)) {
parameters.put(ICharacterReportConstants.BREEDING_VALU... |
Inversion-Mutation | megadiff | "protected void setSubscriber(Subscriber subscriber) {
super.setSubscriber(subscriber);
if (CVSUIPlugin.getPlugin().getPluginPreferences().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) {
setSyncInfoFilter(contentComparison);
}
try {
ISynchronizeParticipantDescriptor descriptor = TeamUI.getSyn... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setSubscriber" | "protected void setSubscriber(Subscriber subscriber) {
super.setSubscriber(subscriber);
if (CVSUIPlugin.getPlugin().getPluginPreferences().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS)) {
setSyncInfoFilter(contentComparison);
}
<MASK>CVSUIPlugin.getPlugin().getPluginPreferences().addPropertyChangeL... |
Inversion-Mutation | megadiff | "private void handleClosedSite(String string) {
if (!noDB) {
noDB = true;
DialogBox dialogBox = new DialogBox();
DOM.setElementAttribute(dialogBox.getElement(), "id", "closed_site");
HTML html = new HTML(string);
dialogBox.setWidget(html);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleClosedSite" | "private void handleClosedSite(String string) {
<MASK>noDB = true;</MASK>
if (!noDB) {
DialogBox dialogBox = new DialogBox();
DOM.setElementAttribute(dialogBox.getElement(), "id", "closed_site");
HTML html = new HTML(string);
dialogBox.setWidget(h... |
Inversion-Mutation | megadiff | "@Test
public void testMetricsCache() {
MetricsSystem ms = new MetricsSystemImpl("cache");
ms.start();
try {
String p1 = "root1";
String leafQueueName = "root1.leaf";
QueueMetrics p1Metrics =
QueueMetrics.forQueue(ms, p1, null, true, conf);
Queue parent... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testMetricsCache" | "@Test
public void testMetricsCache() {
MetricsSystem ms = new MetricsSystemImpl("cache");
try {
String p1 = "root1";
String leafQueueName = "root1.leaf";
<MASK>ms.start();</MASK>
QueueMetrics p1Metrics =
QueueMetrics.forQueue(ms, p1, null, true, conf);
... |
Inversion-Mutation | megadiff | "public boolean act (float delta) {
if (!ran) {
ran = true;
run();
}
return true;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "act" | "public boolean act (float delta) {
if (!ran) {
<MASK>run();</MASK>
ran = true;
}
return true;
}" |
Inversion-Mutation | megadiff | "protected String convertViewIdIfNeed(FacesContext context) {
WebappConfig webappConfig = getWebappConfig(context);
ExternalContext externalContext = context.getExternalContext();
String viewId = context.getViewRoot().getViewId();
// PortletSupport
if (PortletUtil.isPortlet... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "convertViewIdIfNeed" | "protected String convertViewIdIfNeed(FacesContext context) {
WebappConfig webappConfig = getWebappConfig(context);
ExternalContext externalContext = context.getExternalContext();
<MASK>String urlPattern = getUrlPattern(webappConfig, context);</MASK>
String viewId = context.getViewRo... |
Inversion-Mutation | megadiff | "@Override
public void onDestroy() {
synchronized(sSyncLock) {
alwaysLog("!!! EAS ExchangeService, onDestroy");
// Stop the sync manager thread and return
synchronized (sSyncLock) {
if (sServiceThread != null) {
sStop = true;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onDestroy" | "@Override
public void onDestroy() {
synchronized(sSyncLock) {
alwaysLog("!!! EAS ExchangeService, onDestroy");
// Stop the sync manager thread and return
synchronized (sSyncLock) {
<MASK>sStop = true;</MASK>
if (sServiceThread != nu... |
Inversion-Mutation | megadiff | "public PlayerManager(ChatCore instance) {
clean();
plugin = instance;
config = new File(plugin.getDataFolder(), "players.yml");
if (!config.exists()) {
getConfig().setDefaults(YamlConfiguration.loadConfiguration(plugin.getClass().getResourceAsStream("/defaults/players.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PlayerManager" | "public PlayerManager(ChatCore instance) {
clean();
plugin = instance;
<MASK>persist = plugin.getConfig().getBoolean("plugin.persist_user_settings");</MASK>
config = new File(plugin.getDataFolder(), "players.yml");
if (!config.exists()) {
getConfig().setDefaults... |
Inversion-Mutation | megadiff | "@Override
public void paintCollapsiblePanesBackground(JComponent c, Graphics g, Rectangle rect, int orientation, int state) {
if (!c.isOpaque()) {
return;
}
Boolean highContrast = UIManager.getBoolean("Theme.highContrast");
if (highContrast) {
super.pa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "paintCollapsiblePanesBackground" | "@Override
public void paintCollapsiblePanesBackground(JComponent c, Graphics g, Rectangle rect, int orientation, int state) {
if (!c.isOpaque()) {
return;
}
Boolean highContrast = UIManager.getBoolean("Theme.highContrast");
if (highContrast) {
super.pa... |
Inversion-Mutation | megadiff | "protected void undeployBeans(KernelController controller, KernelDeployment deployment)
{
Set<NamedAliasMetaData> aliases = deployment.getAliases();
if (aliases != null && aliases.isEmpty() == false)
{
for (NamedAliasMetaData alias : aliases)
controller.removeAlias(alias... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "undeployBeans" | "protected void undeployBeans(KernelController controller, KernelDeployment deployment)
{
<MASK>super.undeployBeans(controller, deployment);</MASK>
Set<NamedAliasMetaData> aliases = deployment.getAliases();
if (aliases != null && aliases.isEmpty() == false)
{
for (NamedAliasMet... |
Inversion-Mutation | megadiff | "private static InputStream inflate(final InputStream in, final long size,
final ObjectId id) {
final Inflater inf = InflaterCache.get();
return new InflaterInputStream(in, inf) {
private long remaining = size;
@Override
public int read(byte[] b, int off, int cnt) throws IOException {
try {... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "inflate" | "private static InputStream inflate(final InputStream in, final long size,
final ObjectId id) {
final Inflater inf = InflaterCache.get();
return new InflaterInputStream(in, inf) {
private long remaining = size;
@Override
public int read(byte[] b, int off, int cnt) throws IOException {
try {... |
Inversion-Mutation | megadiff | "@Override
public void close() throws IOException {
try {
if (remaining <= 0)
checkValidEndOfStream(in, inf, id, new byte[64]);
} finally {
InflaterCache.release(inf);
super.close();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close" | "@Override
public void close() throws IOException {
try {
if (remaining <= 0)
checkValidEndOfStream(in, inf, id, new byte[64]);
<MASK>super.close();</MASK>
} finally {
InflaterCache.release(inf);
}
}" |
Inversion-Mutation | megadiff | "protected ProgressMonitorDialog openProgress() {
progressDialog = new ProgressMonitorDialog(getShell());
progressDialog.setCancelable(true);
progressDialog.open();
return progressDialog;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "openProgress" | "protected ProgressMonitorDialog openProgress() {
progressDialog = new ProgressMonitorDialog(getShell());
<MASK>progressDialog.open();</MASK>
progressDialog.setCancelable(true);
return progressDialog;
}" |
Inversion-Mutation | megadiff | "@Override
public SqlScript createCleanScript(JdbcTemplate jdbcTemplate) {
final List<String> allDropStatements = new ArrayList<String>();
allDropStatements.addAll(generateDropStatementsForObjectType(jdbcTemplate, "SEQUENCE", ""));
allDropStatements.addAll(generateDropStatementsForObject... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createCleanScript" | "@Override
public SqlScript createCleanScript(JdbcTemplate jdbcTemplate) {
final List<String> allDropStatements = new ArrayList<String>();
allDropStatements.addAll(generateDropStatementsForObjectType(jdbcTemplate, "SEQUENCE", ""));
allDropStatements.addAll(generateDropStatementsForObject... |
Inversion-Mutation | megadiff | "@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onPlayerInteract(PlayerInteractEvent event) {
if ((event.getAction() == Action.RIGHT_CLICK_BLOCK)
|| ((event.getAction() == Action.LEFT_CLICK_BLOCK))) {
BlockState state = event.getClickedBlock().getState();
Play... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPlayerInteract" | "@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onPlayerInteract(PlayerInteractEvent event) {
if ((event.getAction() == Action.RIGHT_CLICK_BLOCK)
|| ((event.getAction() == Action.LEFT_CLICK_BLOCK))) {
BlockState state = event.getClickedBlock().getState();
Play... |
Inversion-Mutation | megadiff | "public void getDissemination(Context context, String PID, String bDefPID, String methodName,
Property[] userParms, Date asOfDateTime, HttpServletResponse response, HttpServletRequest request)
throws IOException, ServerException
{
ServletOutputStream out = null;
MIMETypedStream dissemination ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getDissemination" | "public void getDissemination(Context context, String PID, String bDefPID, String methodName,
Property[] userParms, Date asOfDateTime, HttpServletResponse response, HttpServletRequest request)
throws IOException, ServerException
{
ServletOutputStream out = null;
MIMETypedStream dissemination ... |
End of preview. Expand in Data Studio
- Downloads last month
- 8