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 ... |
Inversion-Mutation | megadiff | "@Override
public void onAddImages(String model, String code, ScanRecord[] items) {
if (layout.getMembers().length != 0) {
layout.removeMember(tileGridLayout);
}
tileGridLayout = new VLayout();
tileGrid = new TileGrid();
tileGrid.setTileWidth(Constants.TILE... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onAddImages" | "@Override
public void onAddImages(String model, String code, ScanRecord[] items) {
if (layout.getMembers().length != 0) {
layout.removeMember(tileGridLayout);
}
tileGridLayout = new VLayout();
tileGrid = new TileGrid();
tileGrid.setTileWidth(Constants.TILE... |
Inversion-Mutation | megadiff | "@Override
public void onStep(Actor actor) {
if(actor instanceof Player)
dropFlag((Player)actor);
actor.teleport(getDestination());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onStep" | "@Override
public void onStep(Actor actor) {
<MASK>actor.teleport(getDestination());</MASK>
if(actor instanceof Player)
dropFlag((Player)actor);
}" |
Inversion-Mutation | megadiff | "public static StringBuilder buildMethodName(StringBuilder buf, Types types, ExecutableElement e) {
// use the full parameter list as a part of ID to handle overloading
buf.append(e.getSimpleName()).append('(');
boolean first=true;
List<? extends VariableElement> parameters = safeGet... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildMethodName" | "public static StringBuilder buildMethodName(StringBuilder buf, Types types, ExecutableElement e) {
// use the full parameter list as a part of ID to handle overloading
buf.append(e.getSimpleName()).append('(');
boolean first=true;
List<? extends VariableElement> parameters = safeGet... |
Inversion-Mutation | megadiff | "public void startGame(int numPlayers , int numDecks){
deckList = new ArrayList<Deck>();
playerList = new ArrayList<Player>();
for(int i = 0; i < numDecks; i ++){
Deck d = new Deck();
d.shuffle();
deckList.add(d);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startGame" | "public void startGame(int numPlayers , int numDecks){
deckList = new ArrayList<Deck>();
playerList = new ArrayList<Player>();
for(int i = 0; i < numDecks; i ++){
Deck d = new Deck();
d.shuffle();
deckList.add(d);
}
... |
Inversion-Mutation | megadiff | "protected void buildContentPanel() {
DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
model = new TodoListModel(selectionModel);
lstPrimitives = new JList(model);
lstPrimitives.setSelectionModel(selectionModel);
lstPrimitives.setSelectionMode(Li... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildContentPanel" | "protected void buildContentPanel() {
DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
model = new TodoListModel(selectionModel);
lstPrimitives = new JList(model);
<MASK>lstPrimitives.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);</MASK>
l... |
Inversion-Mutation | megadiff | "private void resetInternal() {
if (colorMap!=null) colorMap.clear();
if (xyGraph!=null) {
try {
for (Axis axis : xyGraph.getAxisList()) axis.setRange(0,100);
clearTraces();
} catch (Throwable e) {
logger.error("Cannot remove plots!", e);
}
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resetInternal" | "private void resetInternal() {
if (colorMap!=null) colorMap.clear();
if (xyGraph!=null) {
try {
<MASK>clearTraces();</MASK>
for (Axis axis : xyGraph.getAxisList()) axis.setRange(0,100);
} catch (Throwable e) {
logger.error("Cannot remove plots!", e);
}
}
}" |
Inversion-Mutation | megadiff | "private Boolean CheckDB()
{
try
{
rhybuddCache = this.openOrCreateDatabase("rhybuddCache", MODE_PRIVATE, null);
dbResults = rhybuddCache.query("events",new String[]{"EVID","Count","lastTime","device","summary","eventState","firstTime","severity"},null, null, null, null, null);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "CheckDB" | "private Boolean CheckDB()
{
<MASK>rhybuddCache = this.openOrCreateDatabase("rhybuddCache", MODE_PRIVATE, null);</MASK>
try
{
dbResults = rhybuddCache.query("events",new String[]{"EVID","Count","lastTime","device","summary","eventState","firstTime","severity"},null, null, null, null, null... |
Inversion-Mutation | megadiff | "public void bootPlayer (ClientObject caller, int tableId, int position,
TableService.InvocationListener listener)
throws InvocationException
{
BodyObject booter = (BodyObject) caller;
Table table = _tables.get(tableId);
if (table == null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "bootPlayer" | "public void bootPlayer (ClientObject caller, int tableId, int position,
TableService.InvocationListener listener)
throws InvocationException
{
BodyObject booter = (BodyObject) caller;
Table table = _tables.get(tableId);
if (table == null) {
... |
Inversion-Mutation | megadiff | "private static AbstractValueType mapNumericType(SPSSVariable variable) {
switch(getSpssNumericDataType(variable)) {
case COMMA: // comma
case DOLLAR: // dollar
case DOT: // dot
case FIXED: // fixed format (default)
case SCIENTIFIC: // scientific notation
return variab... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mapNumericType" | "private static AbstractValueType mapNumericType(SPSSVariable variable) {
switch(getSpssNumericDataType(variable)) {
case COMMA: // comma
case DOLLAR: // dollar
case DOT: // dot
case FIXED: // fixed format (default)
case SCIENTIFIC: // scientific notation
return variab... |
Inversion-Mutation | megadiff | "@Override
public void accept(TaskData taskData) {
ITask task = taskList.getTask(taskData.getRepositoryUrl(), taskData.getTaskId());
if (task == null) {
task = tasksModel.createTask(repository, taskData.getTaskId());
((AbstractTask) task).setSynchronizationState(SynchronizationState.INCOMING_NEW);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "accept" | "@Override
public void accept(TaskData taskData) {
ITask task = taskList.getTask(taskData.getRepositoryUrl(), taskData.getTaskId());
if (task == null) {
task = tasksModel.createTask(repository, taskData.getTaskId());
((AbstractTask) task).setSynchronizationState(SynchronizationState.INCOMING_NEW);
... |
Inversion-Mutation | megadiff | "public TileSet(TiledMap map, Element element, boolean loadImage) throws SlickException {
this.map = map;
firstGID = Integer.parseInt(element.getAttribute("firstgid"));
String source = element.getAttribute("source");
if ((source != null) && (!source.equals(""))) {
try {
InputStream in = Resour... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TileSet" | "public TileSet(TiledMap map, Element element, boolean loadImage) throws SlickException {
this.map = map;
<MASK>name = element.getAttribute("name");</MASK>
firstGID = Integer.parseInt(element.getAttribute("firstgid"));
String source = element.getAttribute("source");
if ((source != null) && (!source.e... |
Inversion-Mutation | megadiff | "public void popupDismissed(boolean topPopupOnly) {
initializePopup();
// if the 2nd level popup gets dismissed
if (mPopupStatus == POPUP_SECOND_LEVEL) {
mPopupStatus = POPUP_FIRST_LEVEL;
if (topPopupOnly) mUI.showPopup(mPopup);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "popupDismissed" | "public void popupDismissed(boolean topPopupOnly) {
// if the 2nd level popup gets dismissed
if (mPopupStatus == POPUP_SECOND_LEVEL) {
<MASK>initializePopup();</MASK>
mPopupStatus = POPUP_FIRST_LEVEL;
if (topPopupOnly) mUI.showPopup(mPopup);
}
}" |
Inversion-Mutation | megadiff | "public float[] getViewMatrix() {
if (mLookAt != null) {
Matrix.setLookAtM(mVMatrix, 0, mPosition.x, mPosition.y,
mPosition.z, mLookAt.x, mLookAt.y, mLookAt.z, mUpAxis.x, mUpAxis.y,
mUpAxis.z);
mLocalOrientation.fromEuler(mRotation.y, mRotation.z, mRotation.x);
mLocalOrientation.toRotati... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getViewMatrix" | "public float[] getViewMatrix() {
if (mLookAt != null) {
Matrix.setLookAtM(mVMatrix, 0, mPosition.x, mPosition.y,
mPosition.z, mLookAt.x, mLookAt.y, mLookAt.z, mUpAxis.x, mUpAxis.y,
mUpAxis.z);
mLocalOrientation.fromEuler(mRotation.y, mRotation.z, mRotation.x);
mLocalOrientation.toRotati... |
Inversion-Mutation | megadiff | "@Override
public void execute(final EcBuildOrder s, final EcEvolver e)
{
s.minerals -= 50;
s.gas -= 100;
s.addFutureAction(17, new Runnable()
{
@Override
public void run()
{
if (e.debug)
e.obtained(s," Overseer+1");
s.overlords -= 1;
s.overseers += 1;
}
});
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "@Override
public void execute(final EcBuildOrder s, final EcEvolver e)
{
s.minerals -= 50;
s.gas -= 100;
<MASK>s.overlords -= 1;</MASK>
s.addFutureAction(17, new Runnable()
{
@Override
public void run()
{
if (e.debug)
e.obtained(s," Overseer+1");
s.overseers += 1;
}
... |
Inversion-Mutation | megadiff | "private boolean handleGet(HttpServletRequest request, HttpServletResponse response, String path) throws IOException, JSONException, ServletException, URISyntaxException, CoreException {
Path p = new Path(path);
// FIXME: what if a remote or branch is named "file"?
if (p.segment(0).equals("file")) { //$NON-NLS... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleGet" | "private boolean handleGet(HttpServletRequest request, HttpServletResponse response, String path) throws IOException, JSONException, ServletException, URISyntaxException, CoreException {
Path p = new Path(path);
// FIXME: what if a remote or branch is named "file"?
if (p.segment(0).equals("file")) { //$NON-NLS... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
app = this;
StorageUtil.initialize();
AppData.getInstance().initialize();
DensityAdaptor.init(this);
StorageUtil.loadCachedBooks();
CloudAPI.CloudTok... | 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);
requestWindowFeature(Window.FEATURE_NO_TITLE);
app = this;
AppData.getInstance().initialize();
DensityAdaptor.init(this);
<MASK>StorageUtil.initialize();</MASK>
StorageUtil.loadCachedBooks();
Clou... |
Inversion-Mutation | megadiff | "public void updated( Dictionary configuration )
throws ConfigurationException
{
if( configuration == null )
{
configureDefaults();
return;
}
Properties extracted = extractKeys( configuration );
LogManager.resetConfiguration();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updated" | "public void updated( Dictionary configuration )
throws ConfigurationException
{
if( configuration == null )
{
configureDefaults();
return;
}
Properties extracted = extractKeys( configuration );
// If the updated() method is called ... |
Inversion-Mutation | megadiff | "public static <T> String join(Collection<T> collection, String separator) {
String out = "";
Boolean firstElement = true;
for (T t : collection) {
if (!firstElement)
out += separator;
out += t;
firstElement = false;
}
return out;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "join" | "public static <T> String join(Collection<T> collection, String separator) {
String out = "";
Boolean firstElement = true;
for (T t : collection) {
<MASK>out += t;</MASK>
if (!firstElement)
out += separator;
firstElement = false;
}
return out;
}" |
Inversion-Mutation | megadiff | "@Override
public void doCrawl(HttpServletRequest req) throws WebCrawlException {
int i = 0;
int j = 0;
int k = 0;
String msg = null;
String urlStr = null;
try {
for (k=0; k<URL_LIST.length; k++) {
urlStr = URL_LIST[k];
logger.info... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doCrawl" | "@Override
public void doCrawl(HttpServletRequest req) throws WebCrawlException {
int i = 0;
int j = 0;
int k = 0;
String msg = null;
String urlStr = null;
try {
for (k=0; k<URL_LIST.length; k++) {
urlStr = URL_LIST[k];
logger.info... |
Inversion-Mutation | megadiff | "private void showAddressField() {
dialog = new Dialog(activity);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.dialog_searchaddress);
final TextView message = (TextView) dialog.findViewById(R.id.message);
message.setText(R.string.searchAddressTask);
final ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showAddressField" | "private void showAddressField() {
dialog = new Dialog(activity);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.dialog_searchaddress);
final TextView message = (TextView) dialog.findViewById(R.id.message);
message.setText(R.string.searchAddressTask);
final ... |
Inversion-Mutation | megadiff | "public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction() != KeyEvent.ACTION_DOWN) {
return false;
}
switch (keyCode) {
case KeyEvent.KEYCODE_ENTER:
case KeyEvent.KEYCODE_... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onKey" | "public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction() != KeyEvent.ACTION_DOWN) {
return false;
}
switch (keyCode) {
case KeyEvent.KEYCODE_ENTER:
case KeyEvent.KEYCODE_... |
Inversion-Mutation | megadiff | "protected void fillDialogMenu(IMenuManager dialogMenu) {
dialogMenu.add(new GroupMarker("SystemMenuStart")); //$NON-NLS-1$
dialogMenu.add(new MoveAction());
dialogMenu.add(new ResizeAction());
if (showPersistActions) {
dialogMenu.add(new PersistLocationAction());
dialogMenu.add(new PersistSizeActi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "fillDialogMenu" | "protected void fillDialogMenu(IMenuManager dialogMenu) {
dialogMenu.add(new GroupMarker("SystemMenuStart")); //$NON-NLS-1$
dialogMenu.add(new MoveAction());
dialogMenu.add(new ResizeAction());
if (showPersistActions) {
<MASK>dialogMenu.add(new PersistSizeAction());</MASK>
dialogMenu.add(new Persist... |
Inversion-Mutation | megadiff | "private void createJREComposite(Composite main) {
// Create our composite
jreComposite = new Composite(main, SWT.NONE);
FormData cData = new FormData();
cData.left = new FormAttachment(0, 5);
cData.right = new FormAttachment(100, -5);
cData.top = new FormAttachment(homeDirComposite, 10);
jreComp... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createJREComposite" | "private void createJREComposite(Composite main) {
// Create our composite
jreComposite = new Composite(main, SWT.NONE);
FormData cData = new FormData();
cData.left = new FormAttachment(0, 5);
cData.right = new FormAttachment(100, -5);
cData.top = new FormAttachment(homeDirComposite, 10);
jreComp... |
Inversion-Mutation | megadiff | "public void widgetSelected(SelectionEvent e) {
String currentVM = jreCombo.getText();
if (showPreferencePage()) {
updateJREs();
jreCombo.setItems(jreNames);
jreCombo.setText(currentVM);
if (jreCombo.getSelectionIndex() == -1)
jreCombo.select(defaultVMIndex);
jreComboInde... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "widgetSelected" | "public void widgetSelected(SelectionEvent e) {
String currentVM = jreCombo.getText();
if (showPreferencePage()) {
updateJREs();
<MASK>updateErrorMessage();</MASK>
jreCombo.setItems(jreNames);
jreCombo.setText(currentVM);
if (jreCombo.getSelectionIndex() == -1)
jreCombo.se... |
Inversion-Mutation | megadiff | "@Override
public boolean insertActions(ReconfigurationPlan plan) {
if (cSlice.getHoster().getVal() != dSlice.getHoster().getVal()) {
plan.add(new MigrateVM(vm,
rp.getNode(cSlice.getHoster().getVal()),
rp.getNode(dSlice.getHoster().getVal()),
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "insertActions" | "@Override
public boolean insertActions(ReconfigurationPlan plan) {
if (cSlice.getHoster().getVal() != dSlice.getHoster().getVal()) {
plan.add(new MigrateVM(vm,
rp.getNode(cSlice.getHoster().getVal()),
rp.getNode(dSlice.getHoster().getVal()),
... |
Inversion-Mutation | megadiff | "@Override
public Map<AbstractMetaDataWrapper, XMLFilter> getMetaDataWrappers() {
Map<AbstractMetaDataWrapper, XMLFilter> wrapperMap = new LinkedHashMap<AbstractMetaDataWrapper, XMLFilter>();
wrapperMap.put(new NaaSignedAipWrapNormaliser(), new NaaSignedAipUnwrapFilter());
wrapperMap.put(new NaaPackageWrapN... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getMetaDataWrappers" | "@Override
public Map<AbstractMetaDataWrapper, XMLFilter> getMetaDataWrappers() {
Map<AbstractMetaDataWrapper, XMLFilter> wrapperMap = new LinkedHashMap<AbstractMetaDataWrapper, XMLFilter>();
<MASK>wrapperMap.put(new NaaPackageWrapNormaliser(), new NaaPackageUnwrapFilter());</MASK>
wrapperMap.put(new NaaSign... |
Inversion-Mutation | megadiff | "public boolean changePassword(final String username, final String password) {
final Login loginUser = this.getLoginUser(username);
if (loginUser != null) {
this.em.getTransaction().begin();
loginUser.setPassword(password);
this.em.persist(loginUser);
this.em.getTransaction().commit();
return... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "changePassword" | "public boolean changePassword(final String username, final String password) {
<MASK>this.em.getTransaction().begin();</MASK>
final Login loginUser = this.getLoginUser(username);
if (loginUser != null) {
loginUser.setPassword(password);
this.em.persist(loginUser);
this.em.getTransaction().commit()... |
Inversion-Mutation | megadiff | "public void internalRun() throws InterruptedException {
response.setRequestId(request.getRequestId());
Service service = services.get(request.getFullServiceName());
if (service == null) {
response.setError(Data.Response.RpcError.UNKNOWN_SERVICE);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "internalRun" | "public void internalRun() throws InterruptedException {
Service service = services.get(request.getFullServiceName());
if (service == null) {
response.setError(Data.Response.RpcError.UNKNOWN_SERVICE);
output.put(response.build());
return;
... |
Inversion-Mutation | megadiff | "private void adjustStatusBarLocked() {
if (mStatusBarManager == null) {
mStatusBarManager = (StatusBarManager)
mContext.getSystemService(Context.STATUS_BAR_SERVICE);
}
if (mStatusBarManager == null) {
Log.w(TAG, "Could not get status bar manager... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "adjustStatusBarLocked" | "private void adjustStatusBarLocked() {
if (mStatusBarManager == null) {
mStatusBarManager = (StatusBarManager)
mContext.getSystemService(Context.STATUS_BAR_SERVICE);
}
if (mStatusBarManager == null) {
Log.w(TAG, "Could not get status bar manager... |
Inversion-Mutation | megadiff | "public static String nameDiscriminator(ViewElement element) {
String baseName = element.getName();
StringBuffer buffer = new StringBuffer();
EObject container = element.eContainer();
while (container instanceof ViewElement) {
if (((ViewElement)container).getName().equals(baseName)) {
buffer.append... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "nameDiscriminator" | "public static String nameDiscriminator(ViewElement element) {
String baseName = element.getName();
StringBuffer buffer = new StringBuffer();
EObject container = element.eContainer();
while (container instanceof ViewElement) {
if (((ViewElement)container).getName().equals(baseName)) {
buffer.append... |
Inversion-Mutation | megadiff | "public void parse() throws IOException {
while (this.recognizer.hasNext()) {
this.read();
// System.out.println(this.current + " : " + this.lexeme);
// try {
// Thread.sleep(1);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
if (this.current == TEXT) {
whil... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parse" | "public void parse() throws IOException {
while (this.recognizer.hasNext()) {
this.read();
// System.out.println(this.current + " : " + this.lexeme);
// try {
// Thread.sleep(1);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
if (this.current == TEXT) {
whil... |
Inversion-Mutation | megadiff | "public ClientHub(String ip, int port, long id) throws IOException {
super(id);
cmdChain = new Commands.CmdConnect(this);
cmdChain.append(
new Commands.CmdDisconnect(this)).append(
new Commands.CmdMsg(this));
comm = new ClientComm(ip, port, this);
addConnection(new BroadcastConnection(this));
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ClientHub" | "public ClientHub(String ip, int port, long id) throws IOException {
super(id);
<MASK>comm = new ClientComm(ip, port, this);</MASK>
cmdChain = new Commands.CmdConnect(this);
cmdChain.append(
new Commands.CmdDisconnect(this)).append(
new Commands.CmdMsg(this));
addConnection(new BroadcastConnec... |
Inversion-Mutation | megadiff | "public MainDonateEvent() {
super(null, 0, 0,
FreeDonateEvent.instance(),
LifeDonateEvent.instance(),
AuthDonateEvent.instance(),
PaidDonateEvent.instance(),
CadpageDonateEvent.instance(),
SponsorDonateEvent.instance(),
DonateExemptEvent.instance(),
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MainDonateEvent" | "public MainDonateEvent() {
super(null, 0, 0,
FreeDonateEvent.instance(),
LifeDonateEvent.instance(),
AuthDonateEvent.instance(),
CadpageDonateEvent.instance(),
SponsorDonateEvent.instance(),
<MASK>PaidDonateEvent.instance(),</MASK>
DonateExemptEvent.... |
Inversion-Mutation | megadiff | "private RelTypeElement( String type, NodeImpl node, IntArray src,
IntArray add, IntArray remove )
{
super( type, node );
if ( src == null )
{
src = IntArray.EMPTY;
srcTraversed = true;
}
this.src = src;
if ( add == null )
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "RelTypeElement" | "private RelTypeElement( String type, NodeImpl node, IntArray src,
IntArray add, IntArray remove )
{
super( type, node );
<MASK>this.src = src;</MASK>
if ( src == null )
{
src = IntArray.EMPTY;
srcTraversed = true;
}
if ( add... |
Inversion-Mutation | megadiff | "public static void startAgents(IThreadContext threadContext)
throws ManifoldCFException
{
// Get agent manager
IAgentManager manager = AgentManagerFactory.make(threadContext);
ManifoldCFException problem = null;
synchronized (runningHash)
{
// DO NOT permit this method to do an... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startAgents" | "public static void startAgents(IThreadContext threadContext)
throws ManifoldCFException
{
// Get agent manager
IAgentManager manager = AgentManagerFactory.make(threadContext);
<MASK>String[] classes = manager.getAllAgents();</MASK>
ManifoldCFException problem = null;
synchronized (runn... |
Inversion-Mutation | megadiff | "@Override
public void storeRepresentation(Representation entity)
throws ResourceException {
final Form form = new Form(entity);
final List<String> mailAddresses = new ArrayList<String>();
for (final Parameter parameter : form.subList("recipients")) {
mailAddr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "storeRepresentation" | "@Override
public void storeRepresentation(Representation entity)
throws ResourceException {
final Form form = new Form(entity);
final List<String> mailAddresses = new ArrayList<String>();
for (final Parameter parameter : form.subList("recipients")) {
mailAddr... |
Inversion-Mutation | megadiff | "@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
super.run(monitor);
}
finally {
// Once upload is successful, synchronize the modified time.
for (int i = 0; i < nodes.length; i++) {
final FSTreeNode node = nodes[i];
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
super.run(monitor);
}
finally {
// Once upload is successful, synchronize the modified time.
for (int i = 0; i < nodes.length; i++) {
final FSTreeNode node = nodes[i];
... |
Inversion-Mutation | megadiff | "@Override
public void run() throws Exception {
StateManager.getInstance().refreshState(node);
PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURI(), node.attr.mtime);
if (sync) {
File file = CacheManager.getInstance().getCacheFile(node);
setLastModifiedCheck... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() throws Exception {
PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURI(), node.attr.mtime);
if (sync) {
File file = CacheManager.getInstance().getCacheFile(node);
setLastModifiedChecked(file, node.attr.mtime);
}
<MASK>Stat... |
Inversion-Mutation | megadiff | "protected void addField(String name, JsonNode elementNode, ServiceTask task) {
FieldExtension field = new FieldExtension();
field.setFieldName(name.substring(8));
String value = getPropertyValueAsString(name, elementNode);
if (StringUtils.isNotEmpty(value)) {
if ((value.contains("${") || val... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addField" | "protected void addField(String name, JsonNode elementNode, ServiceTask task) {
FieldExtension field = new FieldExtension();
field.setFieldName(name.substring(8));
String value = getPropertyValueAsString(name, elementNode);
if (StringUtils.isNotEmpty(value)) {
if ((value.contains("${") || val... |
Inversion-Mutation | megadiff | "private void processTagStart(XmlPullParser parser, boolean isempty) {
if (justended) {
// avoid the pathological case where we have for example
// <td class="tmiblock1" rsf:id="tmiblock:"></td><td> which makes it
// hard to spot run ends on the basis of recursion uncession.
justended =... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processTagStart" | "private void processTagStart(XmlPullParser parser, boolean isempty) {
if (justended) {
// avoid the pathological case where we have for example
// <td class="tmiblock1" rsf:id="tmiblock:"></td><td> which makes it
// hard to spot run ends on the basis of recursion uncession.
justended =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.