type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "private void initializeProperties () throws Exception {
String userHome = System.getProperty("user.home");
String userDir = System.getProperty("user.dir");
String hackyHome = userHome + "/.hackystat";
String sensorBaseHome = hackyHome + "/sensorbase";
String propFile = userHome + "/.hackystat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initializeProperties" | "private void initializeProperties () throws Exception {
String userHome = System.getProperty("user.home");
String userDir = System.getProperty("user.dir");
String hackyHome = userHome + "/.hackystat";
String sensorBaseHome = hackyHome + "/sensorbase";
String propFile = userHome + "/.hackystat... |
Inversion-Mutation | megadiff | "private UserHistoryDictionary(final Context context, final String locale, final int dicTypeId,
SharedPreferences sp) {
super(context, dicTypeId);
mLocale = locale;
mPrefs = sp;
if (sOpenHelper == null) {
sOpenHelper = new DatabaseHelper(getContext());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "UserHistoryDictionary" | "private UserHistoryDictionary(final Context context, final String locale, final int dicTypeId,
SharedPreferences sp) {
super(context, dicTypeId);
mLocale = locale;
if (sOpenHelper == null) {
sOpenHelper = new DatabaseHelper(getContext());
}
if (mL... |
Inversion-Mutation | megadiff | "public void propertyChange(PropertyChangeEvent event) {
if (fSourceViewer == null)
return;
String property= event.getProperty();
// IMPORTANT: Do not call isBlockSelectionModeEnabled() before checking the property!
if (BLOCK_SELECTION_MODE_FONT.equals(property) && isBlockSelectionModeEnabled... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "propertyChange" | "public void propertyChange(PropertyChangeEvent event) {
if (fSourceViewer == null)
return;
String property= event.getProperty();
// IMPORTANT: Do not call isBlockSelectionModeEnabled() before checking the property!
if (BLOCK_SELECTION_MODE_FONT.equals(property) && isBlockSelectionModeEnabled... |
Inversion-Mutation | megadiff | "public void run(String[] args) {
final TimerFrame tf = new TimerFrame();
if (args.length == 2) {
tf.sync(Integer.parseInt(args[1]));
tf.setStatus(Integer.parseInt(args[0]));
} else {
Pcms2 connection = new Pcms2(Settings.instance().host);
connection.hookLengthChange(new Callback<Long>() {... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run(String[] args) {
final TimerFrame tf = new TimerFrame();
if (args.length == 2) {
<MASK>tf.setStatus(Integer.parseInt(args[0]));</MASK>
tf.sync(Integer.parseInt(args[1]));
} else {
Pcms2 connection = new Pcms2(Settings.instance().host);
connection.hookLengthChange(new Callb... |
Inversion-Mutation | megadiff | "public boolean isProtected(Block block, Player player){
checkChunk(block, player);
switch(block.getType()){
case WALL_SIGN:
checkSign(block, player);
return result;
case CHEST:
checkChest(block, player);
return result;
case IRON_DOOR:
return false;
case WOODEN_DOOR:
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "isProtected" | "public boolean isProtected(Block block, Player player){
switch(block.getType()){
case WALL_SIGN:
checkSign(block, player);
return result;
case CHEST:
checkChest(block, player);
return result;
case IRON_DOOR:
return false;
case WOODEN_DOOR:
return false;
case TRAP_D... |
Inversion-Mutation | megadiff | "@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.edit_filter_delete) {
Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.edit_filter_delete_dialog_title);
builder.setNegativeButton(R.string.default_buttons_no, null);
builder.s... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onOptionsItemSelected" | "@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.edit_filter_delete) {
<MASK>EditPOIFilterActivity.this.finish();</MASK>
Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.edit_filter_delete_dialog_title);
builder.setNegativeBut... |
Inversion-Mutation | megadiff | "public void run(String[] args) {
registerDefaultCommands(commands);
if (args.length == 0) {
help();
}
String cmd = args[0].toLowerCase();
if (cmd.equals("help") && args.length == 2) {
help(args[1]);
}
Command command = getCommand(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run(String[] args) {
registerDefaultCommands(commands);
if (args.length == 0) {
help();
}
String cmd = args[0].toLowerCase();
if (cmd.equals("help") && args.length == 2) {
help(args[1]);
}
Command command = getCommand(... |
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) mModule.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) mModule.showPopup(mPopup);
}
... |
Inversion-Mutation | megadiff | "Multipart composeMessageBody(QueryListResponse response) throws MessagingException {
String html = htmlCreator.generateHtmlForResponse(response);
BodyPart mediaPart = new MimeBodyPart();
mediaPart.setContent(html, "text/html");
BodyPart textPart = new MimeBodyPart();
te... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "composeMessageBody" | "Multipart composeMessageBody(QueryListResponse response) throws MessagingException {
String html = htmlCreator.generateHtmlForResponse(response);
BodyPart mediaPart = new MimeBodyPart();
mediaPart.setContent(html, "text/html");
BodyPart textPart = new MimeBodyPart();
te... |
Inversion-Mutation | megadiff | "private void listen(final InputStream is) {
final BufferedInputStream bi = new BufferedInputStream(is);
new Thread() {
@Override
public void run() {
try {
while(true) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
receive(bi, os);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "listen" | "private void listen(final InputStream is) {
new Thread() {
@Override
public void run() {
try {
<MASK>final BufferedInputStream bi = new BufferedInputStream(is);</MASK>
while(true) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
rece... |
Inversion-Mutation | megadiff | "@Override
public Element visit(UmlEnum o, OclCopier.Argument argument) {
if (argument.map.containsKey(o)) {
return argument.map.get(o);
}
UmlEnum result = new UmlEnum();
argument.map.put(o, result);
result.setName(o.getName());
visitElement(o, res... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visit" | "@Override
public Element visit(UmlEnum o, OclCopier.Argument argument) {
if (argument.map.containsKey(o)) {
return argument.map.get(o);
}
UmlEnum result = new UmlEnum();
argument.map.put(o, result);
visitElement(o, result, argument);
<MASK>resu... |
Inversion-Mutation | megadiff | "public synchronized Future<?> addIndexedColumn(ColumnDefinition cdef)
{
if (indexesByColumn.containsKey(cdef.name))
return null;
assert cdef.getIndexType() != null;
SecondaryIndex index;
try
{
index = SecondaryIndex.createInstance(baseC... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addIndexedColumn" | "public synchronized Future<?> addIndexedColumn(ColumnDefinition cdef)
{
if (indexesByColumn.containsKey(cdef.name))
return null;
assert cdef.getIndexType() != null;
<MASK>logger.info("Creating new index : {}",cdef);</MASK>
SecondaryIndex index;
try
... |
Inversion-Mutation | megadiff | "@Override
public void onEnable() {
Bukkit.getPluginManager().registerEvents(this, this);
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
public void run() {
if(new Date().getTime() - lastEgg.getTime() < EGG_FREQUENCY * 1000) return;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable" | "@Override
public void onEnable() {
Bukkit.getPluginManager().registerEvents(this, this);
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
public void run() {
if(new Date().getTime() - lastEgg.getTime() < EGG_FREQUENCY * 1000) return;
... |
Inversion-Mutation | megadiff | "public void run() {
if(new Date().getTime() - lastEgg.getTime() < EGG_FREQUENCY * 1000) return;
List<Player> players = new ArrayList<Player>();
List<Item> items = new ArrayList<Item>();
for(World world : Bukkit.getWorlds()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
if(new Date().getTime() - lastEgg.getTime() < EGG_FREQUENCY * 1000) return;
List<Player> players = new ArrayList<Player>();
List<Item> items = new ArrayList<Item>();
for(World world : Bukkit.getWorlds()) {
... |
Inversion-Mutation | megadiff | "@Override
public Fitness measure(Schedule schedule) {
int violated = 0;
for (Nurse nurse : schedule.toEntity()) {
List<Shift> allShifts = nurse.getAllShifts();
int reducedIndex = -1;
for (int i = 1; i < allShifts.size(); i++) {
Shift tod... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "measure" | "@Override
public Fitness measure(Schedule schedule) {
int violated = 0;
for (Nurse nurse : schedule.toEntity()) {
List<Shift> allShifts = nurse.getAllShifts();
for (int i = 1; i < allShifts.size(); i++) {
<MASK>int reducedIndex = -1;</MASK>
... |
Inversion-Mutation | megadiff | "protected void transferOutputSettings(TransletOutputHandler output) {
// It is an error if this method is called with anything else than
// the translet post-processor (TextOutput)
if (!(output instanceof TextOutput)) return;
TextOutput handler = (TextOutput)output;
// Transfer the output method settin... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "transferOutputSettings" | "protected void transferOutputSettings(TransletOutputHandler output) {
// It is an error if this method is called with anything else than
// the translet post-processor (TextOutput)
if (!(output instanceof TextOutput)) return;
TextOutput handler = (TextOutput)output;
// Transfer the output method settin... |
Inversion-Mutation | megadiff | "public void updateManagementCenterUrl(String newUrl) {
if (newUrl == null) {
return;
}
if (newUrl.equals(managementCenterUrl)) {
return;
}
managementCenterUrl = newUrl;
if (!isRunning()) {
start();
}
u... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateManagementCenterUrl" | "public void updateManagementCenterUrl(String newUrl) {
if (newUrl == null) {
return;
}
<MASK>managementCenterUrl = newUrl;</MASK>
if (newUrl.equals(managementCenterUrl)) {
return;
}
if (!isRunning()) {
start();
}... |
Inversion-Mutation | megadiff | "static void encodeForRuntime(final Declaration d, final GenerateJsVisitor gen, final RuntimeMetamodelAnnotationGenerator annGen) {
gen.out("function(){return{mod:$$METAMODEL$$");
List<TypeParameter> tparms = null;
List<ProducedType> satisfies = null;
if (d instanceof com.redhat.ceyl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeForRuntime" | "static void encodeForRuntime(final Declaration d, final GenerateJsVisitor gen, final RuntimeMetamodelAnnotationGenerator annGen) {
gen.out("function(){return{mod:$$METAMODEL$$");
List<TypeParameter> tparms = null;
List<ProducedType> satisfies = null;
if (d instanceof com.redhat.ceyl... |
Inversion-Mutation | megadiff | "@Override
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException {
// Check whether the user is public
if (subject.getUri().equals(getPublicUser())) {
response.getWriter().println("The public user is not allowed to create new mo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doPost" | "@Override
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException {
// Check whether the user is public
if (subject.getUri().equals(getPublicUser())) {
response.getWriter().println("The public user is not allowed to create new mo... |
Inversion-Mutation | megadiff | "public void initHStoreSite(HStoreSite hstore_site) {
if (t) LOG.trace(String.format("Initializing HStoreSite components at partition %d", this.partitionId));
assert(this.hstore_site == null);
this.hstore_site = hstore_site;
this.hstore_coordinator = hstore_site.getCoordinator();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initHStoreSite" | "public void initHStoreSite(HStoreSite hstore_site) {
if (t) LOG.trace(String.format("Initializing HStoreSite components at partition %d", this.partitionId));
assert(this.hstore_site == null);
this.hstore_site = hstore_site;
this.hstore_coordinator = hstore_site.getCoordinator();
... |
Inversion-Mutation | megadiff | "public TestForUpload() {
setCompositionRoot(main);
main.addComponent(new Label(
"This is a simple test for upload application. "
+ "Upload should work with big files and concurrent "
+ "requests should not be blocked. Button 'b' reads... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TestForUpload" | "public TestForUpload() {
setCompositionRoot(main);
main.addComponent(new Label(
"This is a simple test for upload application. "
+ "Upload should work with big files and concurrent "
+ "requests should not be blocked. Button 'b' reads... |
Inversion-Mutation | megadiff | "public void uploadFinished(FinishedEvent event) {
pi.setVisible(false);
pi2.setVisible(false);
if (event instanceof Upload.FailedEvent) {
Exception reason = ((Upload.FailedEvent) event).getReason();
l.setValue("Finished with f... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "uploadFinished" | "public void uploadFinished(FinishedEvent event) {
pi.setVisible(false);
pi2.setVisible(false);
if (event instanceof Upload.FailedEvent) {
Exception reason = ((Upload.FailedEvent) event).getReason();
l.setValue("Finished with f... |
Inversion-Mutation | megadiff | "public void removeNotify()
{
super.removeNotify();
if (_propsListener != null)
{
_session.getProperties().removePropertyChangeListener(_propsListener);
_propsListener = null;
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeNotify" | "public void removeNotify()
{
if (_propsListener != null)
{
_session.getProperties().removePropertyChangeListener(_propsListener);
_propsListener = null;
}
<MASK>super.removeNotify();</MASK>
}" |
Inversion-Mutation | megadiff | "@SuppressWarnings("unchecked")
@Override
public void onBrowserEvent(Event event)
{
int type = DOM.eventGetType(event);
if (type == Event.ONCLICK)
{
if(selectRowOnClick && row.isEnabled())
{
boolean status = row.isSelected();
grid.onSelectRow(!status, row, true);
}
if(fireEv... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBrowserEvent" | "@SuppressWarnings("unchecked")
@Override
public void onBrowserEvent(Event event)
{
int type = DOM.eventGetType(event);
if (type == Event.ONCLICK)
{
if(selectRowOnClick && row.isEnabled())
{
boolean status = row.isSelected();
grid.onSelectRow(!status, row, true);
}
if(fireEv... |
Inversion-Mutation | megadiff | "public ResultGroup buildResultGroup( int parent )
{
// Make a place for the result
ResultGroup result = new ResultGroup();
// Record the value of the parent group.
if( parent != 0 )
result.value = data.name( parent );
// Record the total number of doc hits for the paren... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildResultGroup" | "public ResultGroup buildResultGroup( int parent )
{
// Make a place for the result
ResultGroup result = new ResultGroup();
// Record the value of the parent group.
if( parent != 0 )
result.value = data.name( parent );
// Record the total number of doc hits for the paren... |
Inversion-Mutation | megadiff | "private ContextGuard(PyObject manager) {
__exit__method = manager.__getattr__("__exit__");
__enter__method = manager.__getattr__("__enter__");
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ContextGuard" | "private ContextGuard(PyObject manager) {
<MASK>__enter__method = manager.__getattr__("__enter__");</MASK>
__exit__method = manager.__getattr__("__exit__");
}" |
Inversion-Mutation | megadiff | "private Boolean _visitVariable(VariableTree node, Void p) {
if (isSynthetic((JFXTree) node)) {
return false;
}
int old = indent;
Tree parent = getCurrentPath().getParentPath().getLeaf();
boolean insideFor = parent.getJavaFXKind() == Ja... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "_visitVariable" | "private Boolean _visitVariable(VariableTree node, Void p) {
if (isSynthetic((JFXTree) node)) {
return false;
}
int old = indent;
Tree parent = getCurrentPath().getParentPath().getLeaf();
boolean insideFor = parent.getJavaFXKind() == Ja... |
Inversion-Mutation | megadiff | "public static void main(String[] args) {
Prop filterDirProp = Props.get("project", "filter.dir");
if (filterDirProp == null) {
Output.print("^error^ Could not find project.filter.dir property.");
System.exit(1);
}
Map<String, Prop> filterFiles = Props.getPr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public static void main(String[] args) {
Prop filterDirProp = Props.get("project", "filter.dir");
if (filterDirProp == null) {
Output.print("^error^ Could not find project.filter.dir property.");
System.exit(1);
}
Map<String, Prop> filterFiles = Props.getPr... |
Inversion-Mutation | megadiff | "@After
public void tearDown() throws Exception {
TournamentDao.delete(t);
ActorDao.delete(a);
PermissionDao.delete(p);
ResourceDao.delete(r);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tearDown" | "@After
public void tearDown() throws Exception {
TournamentDao.delete(t);
<MASK>ResourceDao.delete(r);</MASK>
ActorDao.delete(a);
PermissionDao.delete(p);
}" |
Inversion-Mutation | megadiff | "@Override
protected RestResult doInBackground(String... args) {
try {
request = createRequest();
if (isCancelled())
throw new InterruptedException();
OAuthConsumer consumer = Session.getInstance().getOAuthConsumer();
if (consumer != nul... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInBackground" | "@Override
protected RestResult doInBackground(String... args) {
try {
request = createRequest();
if (isCancelled())
throw new InterruptedException();
OAuthConsumer consumer = Session.getInstance().getOAuthConsumer();
if (consumer != nul... |
Inversion-Mutation | megadiff | "public void receiveUpdate() {
byte[] data = receive();
InputBuffer in = new InputBuffer(data);
int type = in.readInt();
if (type==RescueConstants.HEADER_NULL) return;
int size = in.readInt();
if (type!=RescueConstants.UPDATE) {
System.out.println("I don't know how to deal with "+type);
in.ski... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "receiveUpdate" | "public void receiveUpdate() {
byte[] data = receive();
InputBuffer in = new InputBuffer(data);
int type = in.readInt();
if (type==RescueConstants.HEADER_NULL) return;
int size = in.readInt();
if (type!=RescueConstants.UPDATE) {
System.out.println("I don't know how to deal with "+type);
in.ski... |
Inversion-Mutation | megadiff | "public void remove()
{
m_selectedItems.remove(this);
removeValue(this);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "remove" | "public void remove()
{
<MASK>removeValue(this);</MASK>
m_selectedItems.remove(this);
}" |
Inversion-Mutation | megadiff | "public boolean onOptionsItemSelected(MenuItem item) {
Synodroid app = (Synodroid) getApplication();
DetailMain main = (DetailMain)mAdapter.getItem(MAIN_ITEM);
if (item.getItemId() == R.id.menu_refresh) {
try{
if (app.DEBUG) Log.v(Synodroid.DS_TAG,"DetailActivity: Menu refresh selected.");
}ca... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onOptionsItemSelected" | "public boolean onOptionsItemSelected(MenuItem item) {
Synodroid app = (Synodroid) getApplication();
DetailMain main = (DetailMain)mAdapter.getItem(MAIN_ITEM);
if (item.getItemId() == R.id.menu_refresh) {
try{
if (app.DEBUG) Log.v(Synodroid.DS_TAG,"DetailActivity: Menu refresh selected.");
}ca... |
Inversion-Mutation | megadiff | "public static void main(String[] args) throws Exception
{
if( args.length != 2)
{
System.out.println("Usage SplitFasta fileToSplit numSequencesPerSplit");
System.exit(1);
}
FastaSequenceOneAtATime fsoat = new FastaSequenceOneAtATime(args[0]);
int splitSize = Integer.parseInt(args[1]);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public static void main(String[] args) throws Exception
{
if( args.length != 2)
{
System.out.println("Usage SplitFasta fileToSplit numSequencesPerSplit");
System.exit(1);
}
FastaSequenceOneAtATime fsoat = new FastaSequenceOneAtATime(args[0]);
int splitSize = Integer.parseInt(args[1]);
... |
Inversion-Mutation | megadiff | "private static void callLoginListner(final UserView userView, final AuthenticationListner authenticationListner) {
final TransactionalThread thread = new TransactionalThread() {
final VirtualHost virtualHost = VirtualHost.getVirtualHostForThread();
@Override
public void transactionalRun() {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "callLoginListner" | "private static void callLoginListner(final UserView userView, final AuthenticationListner authenticationListner) {
final TransactionalThread thread = new TransactionalThread() {
final VirtualHost virtualHost = VirtualHost.getVirtualHostForThread();
@Override
public void transactionalRun() {
... |
Inversion-Mutation | megadiff | "@Override
public void transactionalRun() {
try {
VirtualHost.setVirtualHostForThread(virtualHost);
authenticationListner.afterLogin(userView);
} finally {
VirtualHost.releaseVirtualHostFromThread();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "transactionalRun" | "@Override
public void transactionalRun() {
<MASK>authenticationListner.afterLogin(userView);</MASK>
try {
VirtualHost.setVirtualHostForThread(virtualHost);
} finally {
VirtualHost.releaseVirtualHostFromThread();
}
}" |
Inversion-Mutation | megadiff | "@Override
public void onPrepared(final MediaPlayer mp)
{
onMediaPlayerInfoNative(MEDIA_PLAYER_READY, 0, mID);
onMediaPlayerInfoNative(MEDIA_PLAYER_DURATION, getDuration(), mID);
mPreparing = false;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPrepared" | "@Override
public void onPrepared(final MediaPlayer mp)
{
<MASK>onMediaPlayerInfoNative(MEDIA_PLAYER_DURATION, getDuration(), mID);</MASK>
onMediaPlayerInfoNative(MEDIA_PLAYER_READY, 0, mID);
mPreparing = false;
}" |
Inversion-Mutation | megadiff | "public static byte[] encodeArtDmxPacket(final String univers, final String network, final int dmx[] ) throws IOException {
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
// Prepare next trame
artDmxCounter++;
// ID.
byteArrayOutputStream.write(ByteUtils.toByta(C... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeArtDmxPacket" | "public static byte[] encodeArtDmxPacket(final String univers, final String network, final int dmx[] ) throws IOException {
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
// Prepare next trame
artDmxCounter++;
// ID.
byteArrayOutputStream.write(ByteUtils.toByta(C... |
Inversion-Mutation | megadiff | "private void refreshStatus() {
this.progressBar.getDisplay().syncExec(new Runnable() {
@Override public void run() {
if (connected) {
if (EngineStatus.IDLE_XML_LOADED.equals(engineStatus)) {
progressBar.setEnabled(true);
currentPosition = 0;
LOGGER.debug("new Scan -> enable Progr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "refreshStatus" | "private void refreshStatus() {
this.progressBar.getDisplay().syncExec(new Runnable() {
@Override public void run() {
if (connected) {
if (EngineStatus.IDLE_XML_LOADED.equals(engineStatus)) {
progressBar.setEnabled(true);
LOGGER.debug("new Scan -> enable ProgressBar");
} else if (... |
Inversion-Mutation | megadiff | "@Override public void run() {
if (connected) {
if (EngineStatus.IDLE_XML_LOADED.equals(engineStatus)) {
progressBar.setEnabled(true);
currentPosition = 0;
LOGGER.debug("new Scan -> enable ProgressBar");
} else if (EngineStatus.IDLE_NO_XML_LOADED.equals(engineStatus)) {
prog... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override public void run() {
if (connected) {
if (EngineStatus.IDLE_XML_LOADED.equals(engineStatus)) {
progressBar.setEnabled(true);
LOGGER.debug("new Scan -> enable ProgressBar");
} else if (EngineStatus.IDLE_NO_XML_LOADED.equals(engineStatus)) {
progressBar.setEnabled(false);
... |
Inversion-Mutation | megadiff | "private int idForplaylist(String name) {
Cursor c = MusicUtils.query(this, MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI,
new String[] { MediaStore.Audio.Playlists._ID },
MediaStore.Audio.Playlists.NAME + "=?",
new String[] { name },
MediaS... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "idForplaylist" | "private int idForplaylist(String name) {
Cursor c = MusicUtils.query(this, MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI,
new String[] { MediaStore.Audio.Playlists._ID },
MediaStore.Audio.Playlists.NAME + "=?",
new String[] { name },
MediaS... |
Inversion-Mutation | megadiff | "protected final void scanElementDecl() throws IOException, XNIException {
// spaces
fReportEntity = false;
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL",
null);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "scanElementDecl" | "protected final void scanElementDecl() throws IOException, XNIException {
// spaces
fReportEntity = false;
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL",
null);
... |
Inversion-Mutation | megadiff | "private void init(){
this.setFocusable(true);
this.addKeyListener(gc);
this.addMouseMotionListener(new MoveCursor());
this.addMouseListener(gc);
componentListener = new ComponentAdapter() {
@Override public void componentResized(ComponentEvent e) { gameSupport.resize(getSize... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init" | "private void init(){
this.setFocusable(true);
this.addKeyListener(gc);
this.addMouseMotionListener(new MoveCursor());
this.addMouseListener(gc);
<MASK>this.addComponentListener(componentListener);</MASK>
componentListener = new ComponentAdapter() {
@Override public v... |
Inversion-Mutation | megadiff | "private void updateProviderListenersLocked(String provider, boolean enabled) {
int listeners = 0;
LocationProviderProxy p = mProvidersByName.get(provider);
if (p == null) {
return;
}
ArrayList<Receiver> deadReceivers = null;
ArrayList<Upd... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateProviderListenersLocked" | "private void updateProviderListenersLocked(String provider, boolean enabled) {
int listeners = 0;
LocationProviderProxy p = mProvidersByName.get(provider);
if (p == null) {
return;
}
ArrayList<Receiver> deadReceivers = null;
ArrayList<Upd... |
Inversion-Mutation | megadiff | "public void destroy() {
mContent.destroy();
disableRemoteDebugging();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "destroy" | "public void destroy() {
<MASK>disableRemoteDebugging();</MASK>
mContent.destroy();
}" |
Inversion-Mutation | megadiff | "public TalkingLine() {
condPar = new ArrayList<ConditionParser>();
consPar = new ArrayList<ConsequenceParser>();
condPar.add(new illarion.easynpc.parser.talk.conditions.State());
condPar.add(new illarion.easynpc.parser.talk.conditions.Skill());
condPar.add(new illarion.ea... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TalkingLine" | "public TalkingLine() {
condPar = new ArrayList<ConditionParser>();
consPar = new ArrayList<ConsequenceParser>();
condPar.add(new illarion.easynpc.parser.talk.conditions.State());
condPar.add(new illarion.easynpc.parser.talk.conditions.Skill());
condPar.add(new illarion.ea... |
Inversion-Mutation | megadiff | "@Test
public void queryBudget(){
try{
budget.setDescription("I'M A BUDGET!!!!!!!!");
budget.setTotal(1337);
budget.commit();
id = budget.getId();
}catch(Exception e){
fail("cannot sync budget" + e);
}
try{
Budget queriedBudget = Budget.find(id);
assertEqu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "queryBudget" | "@Test
public void queryBudget(){
try{
budget.setDescription("I'M A BUDGET!!!!!!!!");
budget.setTotal(1337);
<MASK>id = budget.getId();</MASK>
budget.commit();
}catch(Exception e){
fail("cannot sync budget" + e);
}
try{
Budget queriedBudget = Budget.find(id);
assertEquals(quer... |
Inversion-Mutation | megadiff | "private Object createBean(final PerRequestInfo pri, final String beanname) {
CreationMarker marker = (CreationMarker) pri.beans.locateBean(beanname);
boolean success = false;
if (marker == null) {
marker = BEAN_IN_CREATION_OBJECT;
pri.beans.set(beanname, marker);
}
try {
R... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createBean" | "private Object createBean(final PerRequestInfo pri, final String beanname) {
CreationMarker marker = (CreationMarker) pri.beans.locateBean(beanname);
boolean success = false;
if (marker == null) {
marker = BEAN_IN_CREATION_OBJECT;
pri.beans.set(beanname, marker);
}
try {
R... |
Inversion-Mutation | megadiff | "public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
this.getListView().setOnScrollListener(new EndlessScrollListener());
if(!recreated) {
refreshAds();
recreated = true;
// TODO: Restore posi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onViewCreated" | "public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if(!recreated) {
refreshAds();
<MASK>this.getListView().setOnScrollListener(new EndlessScrollListener());</MASK>
recreated = true;
// T... |
Inversion-Mutation | megadiff | "public <S extends Number> NumberValueDialog(final Component parent, final VisualProperty<S> vizProp, final S initialValue) {
super(JOptionPane.getFrameForComponent(parent), vizProp.getDisplayName(), true);
super.setLayout(new GridBagLayout());
final GridBagConstraints c = new GridBagConstraints();
final ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "NumberValueDialog" | "public <S extends Number> NumberValueDialog(final Component parent, final VisualProperty<S> vizProp, final S initialValue) {
super(JOptionPane.getFrameForComponent(parent), vizProp.getDisplayName(), true);
super.setLayout(new GridBagLayout());
final GridBagConstraints c = new GridBagConstraints();
final ... |
Inversion-Mutation | megadiff | "public void writeToFile(RandomOutputStream output) throws Exception {
BintexWriter bw = new BintexWriter(output);
int section_count = sections.size();
////////// HEADERS //////////
alog(output.getFilePointer(), "write yes header");
bw.writeRaw(YES_HEADER);
///////// SECTION INDEX ////... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeToFile" | "public void writeToFile(RandomOutputStream output) throws Exception {
BintexWriter bw = new BintexWriter(output);
int section_count = sections.size();
////////// HEADERS //////////
alog(output.getFilePointer(), "write yes header");
bw.writeRaw(YES_HEADER);
///////// SECTION INDEX ////... |
Inversion-Mutation | megadiff | "private void updateRecent(int index)
{
String label = m_commands.get(index).getLabel();
insertComboBoxItem(label, 0);
m_comboBoxHistory.setSelectedIndex(0);
for (int i = 1; i < getComboBoxItemCount(); ++i)
if (getComboBoxItem(i).equals(label))
m_co... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateRecent" | "private void updateRecent(int index)
{
String label = m_commands.get(index).getLabel();
insertComboBoxItem(label, 0);
for (int i = 1; i < getComboBoxItemCount(); ++i)
if (getComboBoxItem(i).equals(label))
m_comboBoxHistory.removeItemAt(i);
<MASK>m... |
Inversion-Mutation | megadiff | "@Override
protected void onResume() {
super.onResume();
mWifiEnabler.resume();
mBtEnabler.resume();
mAirplaneModeEnabler.resume();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onResume" | "@Override
protected void onResume() {
super.onResume();
mWifiEnabler.resume();
<MASK>mAirplaneModeEnabler.resume();</MASK>
mBtEnabler.resume();
}" |
Inversion-Mutation | megadiff | "@Override
public void run() {
if (requestRequired()) {
/* final SearchResult search = */GCMap.searchByGeocodes(Collections.singleton(cache.getGeocode()));
}
CGeoMap.markCacheAsDirty(cache.getGeocode());
CachePopup.startActivity(context, cac... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
if (requestRequired()) {
/* final SearchResult search = */GCMap.searchByGeocodes(Collections.singleton(cache.getGeocode()));
<MASK>CGeoMap.markCacheAsDirty(cache.getGeocode());</MASK>
}
CachePopup.startActi... |
Inversion-Mutation | megadiff | "private void createMultiFieldCombo(Composite composite, GridData gd) {
toolkit.createLabel(composite, "Multiple field constraint");
final Combo combo = new Combo(composite, SWT.READ_ONLY);
combo.setLayoutData(gd);
combo.add("...");
combo.add("All of (And)");
combo.add("Any of (Or)");
combo.setData... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createMultiFieldCombo" | "private void createMultiFieldCombo(Composite composite, GridData gd) {
toolkit.createLabel(composite, "Multiple field constraint");
final Combo combo = new Combo(composite, SWT.READ_ONLY);
combo.setLayoutData(gd);
combo.add("...");
combo.add("All of (And)");
combo.add("Any of (Or)");
combo.setData... |
Inversion-Mutation | megadiff | "public void handleEvent(Event event) {
if (combo.getSelectionIndex() == 0) {
return;
}
CompositeFieldConstraint comp = new CompositeFieldConstraint();
comp.compositeJunctionType = combo.getText();
constraint.addConstraint( comp );
modeller.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleEvent" | "public void handleEvent(Event event) {
if (combo.getSelectionIndex() == 0) {
return;
}
CompositeFieldConstraint comp = new CompositeFieldConstraint();
comp.compositeJunctionType = combo.getText();
constraint.addConstraint( comp );
<MASK>mode... |
Inversion-Mutation | megadiff | "public PlanarImage createColoredBandImage(final RasterDataNode[] rasterDataNodes,
final int level,
int levelCount) {
Assert.notNull(rasterDataNodes,
"rasterDataNodes");
Assert.state(r... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createColoredBandImage" | "public PlanarImage createColoredBandImage(final RasterDataNode[] rasterDataNodes,
final int level,
int levelCount) {
Assert.notNull(rasterDataNodes,
"rasterDataNodes");
Assert.state(r... |
Inversion-Mutation | megadiff | "private void removeOldSSTablesSize(Iterable<SSTableReader> oldSSTables)
{
for (SSTableReader sstable : oldSSTables)
{
if (logger.isDebugEnabled())
logger.debug(String.format("removing %s from list of files tracked for %s.%s",
sstable.des... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeOldSSTablesSize" | "private void removeOldSSTablesSize(Iterable<SSTableReader> oldSSTables)
{
for (SSTableReader sstable : oldSSTables)
{
if (logger.isDebugEnabled())
logger.debug(String.format("removing %s from list of files tracked for %s.%s",
sstable.des... |
Inversion-Mutation | megadiff | "public final void createWindow() {
setTitle("Fanorona");
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(600, 600);
setLocationRelativeTo(null);
rec = new Rectangle();
if (getParent() instanceof JViewport) {
JViewport vp = (JViewport) getParent();
r... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createWindow" | "public final void createWindow() {
setTitle("Fanorona");
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(600, 600);
setLocationRelativeTo(null);
rec = new Rectangle();
if (getParent() instanceof JViewport) {
JViewport vp = (JViewport) getParent();
r... |
Inversion-Mutation | megadiff | "@Override
public void mousePressed(MouseEvent event) {
if (event.getButton() == MouseEvent.BUTTON1) {
clicked = true;
xClick = event.getX();
yClick = event.getY();
updateScreen(true);
//processCl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mousePressed" | "@Override
public void mousePressed(MouseEvent event) {
if (event.getButton() == MouseEvent.BUTTON1) {
<MASK>updateScreen(true);</MASK>
clicked = true;
xClick = event.getX();
yClick = event.getY();
... |
Inversion-Mutation | megadiff | "@Override
public void run() {
Thread.currentThread().setName("JobRunner-" + this.jobId + "-" + executionId);
// If the job is cancelled, disabled, killed. No log is created in this case
if (handleNonReadyStatus()) {
return;
}
createAttachmentFile();
createLogger();
boolean errorFound =... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
Thread.currentThread().setName("JobRunner-" + this.jobId + "-" + executionId);
// If the job is cancelled, disabled, killed. No log is created in this case
if (handleNonReadyStatus()) {
return;
}
createAttachmentFile();
createLogger();
boolean errorFound =... |
Inversion-Mutation | megadiff | "public Session(int boardWidth, int boardHeight, int growthFrequency, long thinkingTime)
{
snakes = new HashMap<Integer, Snake>();
score = new HashMap<Snake, Integer>();
objects = new HashMap<String, GameObjectType>();
initGameObjects();
board = createStandardBoard(boardWidth, boardHeight);
th... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Session" | "public Session(int boardWidth, int boardHeight, int growthFrequency, long thinkingTime)
{
<MASK>board = createStandardBoard(boardWidth, boardHeight);</MASK>
snakes = new HashMap<Integer, Snake>();
score = new HashMap<Snake, Integer>();
objects = new HashMap<String, GameObjectType>();
initGameObjects(... |
Inversion-Mutation | megadiff | "private static void updateSchemas(final PrintWriter writer,
final PgDiffArguments arguments, final PgDatabase oldDatabase,
final PgDatabase newDatabase) {
final boolean setSearchPath = newDatabase.getSchemas().size() > 1
|| !newDatabase.getSchemas().get(0).getName().... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateSchemas" | "private static void updateSchemas(final PrintWriter writer,
final PgDiffArguments arguments, final PgDatabase oldDatabase,
final PgDatabase newDatabase) {
final boolean setSearchPath = newDatabase.getSchemas().size() > 1
|| !newDatabase.getSchemas().get(0).getName().... |
Inversion-Mutation | megadiff | "public MapViewLocation setLocation(double latitude, double longitude) {
MyLocationOverlay myOverlay = LayerUtils.getMyLocationOverlay(mapView, latitude, longitude);
if(lastMyOverlay != null) {
mapView.getOverlays().remove(lastMyOverlay);
}
lastMyOverlay = myOverlay;
mapView.getOverlays().add(myOver... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setLocation" | "public MapViewLocation setLocation(double latitude, double longitude) {
MyLocationOverlay myOverlay = LayerUtils.getMyLocationOverlay(mapView, latitude, longitude);
if(lastMyOverlay != null) {
mapView.getOverlays().remove(lastMyOverlay);
<MASK>lastMyOverlay = myOverlay;</MASK>
}
mapView.getOverlay... |
Inversion-Mutation | megadiff | "static void markAndCopy() {
int i, ref;
if (!concurrentGc) {
getStackRoots();
}
getStaticRoots();
for (;;) {
// pop one object from the gray list
synchronized (mutex) {
ref = greyList;
if (ref==GREY_END) {
break;
}
greyList = Native.rdMem(ref+OFF_GR... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "markAndCopy" | "static void markAndCopy() {
int i, ref;
<MASK>getStaticRoots();</MASK>
if (!concurrentGc) {
getStackRoots();
}
for (;;) {
// pop one object from the gray list
synchronized (mutex) {
ref = greyList;
if (ref==GREY_END) {
break;
}
greyList = Native.rdM... |
Inversion-Mutation | megadiff | "@Override
public void onCreate() {
log = Logger.getDefaultLogger();
pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "KlaxonService");
wakeLock.acquire();
// Listen for incoming calls to kill the ala... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate() {
log = Logger.getDefaultLogger();
pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "KlaxonService");
wakeLock.acquire();
// Listen for incoming calls to kill the ala... |
Inversion-Mutation | megadiff | "public void createTopBarElements() {
// 1. Create view groups and controls
statusBar = createStatusBar();
statusBar.setBackgroundDrawable(view.getResources().getDrawable(R.drawable.box_top));
rightStack = new MapStackControl(view.getContext());
rightStack.addStackView(createAltitudeControl());
r... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createTopBarElements" | "public void createTopBarElements() {
// 1. Create view groups and controls
statusBar = createStatusBar();
statusBar.setBackgroundDrawable(view.getResources().getDrawable(R.drawable.box_top));
rightStack = new MapStackControl(view.getContext());
<MASK>rightStack.addStackView(createDistanceControl());... |
Inversion-Mutation | megadiff | "private void sendMail(MailOutTransportInfo outInfo, MessageContext msgContext)
throws AxisFault, MessagingException, IOException {
OMOutputFormat format = BaseUtils.getOMOutputFormat(msgContext);
MessageFormatter messageFormatter = BaseUtils.getMessageFormatter(msgContext);
WSMi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sendMail" | "private void sendMail(MailOutTransportInfo outInfo, MessageContext msgContext)
throws AxisFault, MessagingException, IOException {
OMOutputFormat format = BaseUtils.getOMOutputFormat(msgContext);
MessageFormatter messageFormatter = BaseUtils.getMessageFormatter(msgContext);
WSMi... |
Inversion-Mutation | megadiff | "public void shutdownMinecraftApplet() {
// Spout Start
if (shutdown) {
return;
}
SpoutClient.getInstance().disableAddons();
shutdown = true;
SpoutClient.disableSandbox();
// Spout End
try {
this.statFileWriter.func_27175_b();
this.statFileWriter.syncStats();
if (this.mcApplet !... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "shutdownMinecraftApplet" | "public void shutdownMinecraftApplet() {
// Spout Start
if (shutdown) {
return;
}
shutdown = true;
SpoutClient.disableSandbox();
<MASK>SpoutClient.getInstance().disableAddons();</MASK>
// Spout End
try {
this.statFileWriter.func_27175_b();
this.statFileWriter.syncStats();
if (th... |
Inversion-Mutation | megadiff | "@EventHandler
public static void handleChat(ChatEvent event) {
if(!event.isCancelled()) AuthChatListener.handleChat(event);
if(!event.isCancelled()) TicketChatHandler.handleChat(event);
if(!event.isCancelled()) MuteChatListener.handleChat(event);
if(!event.isCancelled() && eve... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleChat" | "@EventHandler
public static void handleChat(ChatEvent event) {
if(!event.isCancelled()) AuthChatListener.handleChat(event);
if(!event.isCancelled()) TicketChatHandler.handleChat(event);
if(!event.isCancelled()) MuteChatListener.handleChat(event);
<MASK>if(!event.isCancelled()) ... |
Inversion-Mutation | megadiff | "@Override
public MediaService<Call> getMediaService(final boolean reinvite) throws IllegalStateException, MediaException {
if (getSIPCallState() != SIPCall.State.ANSWERED && getSIPCallState() != SIPCall.State.RINGING
&& getSIPCallState() != SIPCall.State.PROGRESSED) {
throw new IllegalStateExce... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getMediaService" | "@Override
public MediaService<Call> getMediaService(final boolean reinvite) throws IllegalStateException, MediaException {
if (getSIPCallState() != SIPCall.State.ANSWERED && getSIPCallState() != SIPCall.State.RINGING
&& getSIPCallState() != SIPCall.State.PROGRESSED) {
throw new IllegalStateExce... |
Inversion-Mutation | megadiff | "public boolean addUser(String name, String password) {
String query = "INSERT INTO Users (name, password) VALUES ('" + name + "','" + password + "')";
if(execute(query)) {
int userId = getUserId(name);
for(int i = 0; i < 10; i++) {
query = "INSERT INTO Progresses (userId, slotId, progress) VALUES (... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addUser" | "public boolean addUser(String name, String password) {
String query = "INSERT INTO Users (name, password) VALUES ('" + name + "','" + password + "')";
<MASK>int userId = getUserId(name);</MASK>
if(execute(query)) {
for(int i = 0; i < 10; i++) {
query = "INSERT INTO Progresses (userId, slotId, progre... |
Inversion-Mutation | megadiff | "@Override
public void run() {
try {
while(true) {
byte[] header = new byte[4];
if ((dis.read(header)) == -1) {
break;
} else if (header[0] == ActionType.SYNCSTORE) {
int setlen = header[1];
int md5len = header[2];
int contentlen = dis.readInt();
//一次把所... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
try {
while(true) {
byte[] header = new byte[4];
if ((dis.read(header)) == -1) {
break;
} else if (header[0] == ActionType.SYNCSTORE) {
int setlen = header[1];
int md5len = header[2];
int contentlen = dis.readInt();
//一次把所... |
Inversion-Mutation | megadiff | "@Override
protected void notifyFinished(final JobEvent rescheduleInfo) {
this.jobEvent = rescheduleInfo;
this.logger.debug("Notifying job queue {} to continue processing.", this.queueName);
synchronized ( this.syncLock ) {
this.isWaiting = false;
this.syncLock... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "notifyFinished" | "@Override
protected void notifyFinished(final JobEvent rescheduleInfo) {
this.jobEvent = rescheduleInfo;
this.logger.debug("Notifying job queue {} to continue processing.", this.queueName);
<MASK>this.isWaiting = false;</MASK>
synchronized ( this.syncLock ) {
this... |
Inversion-Mutation | megadiff | "public void cleanUp() {
try {
runCode(new Runnable() {
public void run() {
try {
resumeAWT();
TestHelper.cleanUp(StepPlayer.this);
for (Window window : WindowMonitor.getWindows()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cleanUp" | "public void cleanUp() {
try {
runCode(new Runnable() {
public void run() {
try {
resumeAWT();
for (Window window : WindowMonitor.getWindows()) {
window.setVisible(false);
... |
Inversion-Mutation | megadiff | "public void run() {
try {
resumeAWT();
TestHelper.cleanUp(StepPlayer.this);
for (Window window : WindowMonitor.getWindows()) {
window.setVisible(false);
window.dis... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
try {
resumeAWT();
for (Window window : WindowMonitor.getWindows()) {
window.setVisible(false);
window.dispose();
}
... |
Inversion-Mutation | megadiff | "public SlotLabels(int rows, int cols, CurrentSlot currentSlot) {
super(rows + 1, cols);
labelList = new ArrayList<SlotLabel>(rows * cols);
this.currentSlot=currentSlot;
addColumnIdentifiers(cols);
addEmptySlots(rows, cols);
SlotLabel firstLabel = labelList.get(0);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "SlotLabels" | "public SlotLabels(int rows, int cols, CurrentSlot currentSlot) {
super(rows + 1, cols);
labelList = new ArrayList<SlotLabel>(rows * cols);
addColumnIdentifiers(cols);
addEmptySlots(rows, cols);
SlotLabel firstLabel = labelList.get(0);
firstLabel.setBackground(Color.YELLOW)... |
Inversion-Mutation | megadiff | "public void opponentDisconnected() {
gameInProgress = false;
lobbyManager.resetOpponentConnection();
if (lobbyManager.getHostedGame() != null) {
hostWaitScreen.setPotentialOpponent(null);
}
if (gameInProgress) {
JOptionPane.showMessageDialog(gameMain,
"Your opponent disconnected ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "opponentDisconnected" | "public void opponentDisconnected() {
gameInProgress = false;
if (lobbyManager.getHostedGame() != null) {
<MASK>lobbyManager.resetOpponentConnection();</MASK>
hostWaitScreen.setPotentialOpponent(null);
}
if (gameInProgress) {
JOptionPane.showMessageDialog(gameMain,
"Your opponent... |
Inversion-Mutation | megadiff | "@EventHandler(priority = EventPriority.NORMAL)
public void applyInventory(InventoryEvent event) {
if (event.getMessage().equalsIgnoreCase(name)) {
final BattlePlayer p = event.getPlayer();
Inventory i = p.getInventory();
clearInv(p);
ItemStack WOODEN_... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "applyInventory" | "@EventHandler(priority = EventPriority.NORMAL)
public void applyInventory(InventoryEvent event) {
if (event.getMessage().equalsIgnoreCase(name)) {
final BattlePlayer p = event.getPlayer();
Inventory i = p.getInventory();
clearInv(p);
ItemStack WOODEN_... |
Inversion-Mutation | megadiff | "public boolean match(IFileInfo fileInfo) throws CoreException {
if (provider == null) {
IFilterMatcherDescriptor filterDescriptor = project.getWorkspace().getFilterMatcherDescriptor(getId());
if (filterDescriptor != null)
provider = ((FilterDescriptor) filterDescriptor).createFilter();
if (provide... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "match" | "public boolean match(IFileInfo fileInfo) throws CoreException {
if (provider == null) {
IFilterMatcherDescriptor filterDescriptor = project.getWorkspace().getFilterMatcherDescriptor(getId());
if (filterDescriptor != null)
provider = ((FilterDescriptor) filterDescriptor).createFilter();
<MASK>provid... |
Inversion-Mutation | megadiff | "protected synchronized void intialize() throws Exception {
if (isStarted()) {
if (this.initialized == false) {
if (this.directory == null) {
this.directory = new File(IOHelper.getDefaultDataDirectory() + File.pathSeparator + "delayedDB");
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "intialize" | "protected synchronized void intialize() throws Exception {
if (isStarted()) {
if (this.initialized == false) {
<MASK>this.initialized = true;</MASK>
if (this.directory == null) {
this.directory = new File(IOHelper.getDefaultDataDirectory() + ... |
Inversion-Mutation | megadiff | "public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.message_compose);
mAddressAdapter = new EmailAddressAdapter(this);
mAddressValidator = new EmailA... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.message_compose);
mAddressAdapter = new EmailAddressAdapter(this);
mAddressValidator = new EmailA... |
Inversion-Mutation | megadiff | "public PresentableProcessState getPresentableAcquisitionProcessState() {
if (isCanceledOrRejected()) return WorkingCapitalProcessState.CANCELED;
if (isPendingAcceptResponsability()) return WorkingCapitalProcessState.PENDING_ACCEPT_RESPONSIBILITY;
if (isPendingAproval()) return WorkingCapitalProcessState.PENDING_... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getPresentableAcquisitionProcessState" | "public PresentableProcessState getPresentableAcquisitionProcessState() {
if (isCanceledOrRejected()) return WorkingCapitalProcessState.CANCELED;
if (isPendingAcceptResponsability()) return WorkingCapitalProcessState.PENDING_ACCEPT_RESPONSIBILITY;
if (isPendingAproval()) return WorkingCapitalProcessState.PENDING_... |
Inversion-Mutation | megadiff | "@TestTargetNew(
level = TestLevel.COMPLETE,
method = "setDither",
args = {boolean.class}
)
public void testSetDither() {
assertConstantStateNotSet();
assertNull(mDrawableContainer.getCurrent());
mDrawableContainer.setConstantState(mDrawableContainerStat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testSetDither" | "@TestTargetNew(
level = TestLevel.COMPLETE,
method = "setDither",
args = {boolean.class}
)
public void testSetDither() {
assertConstantStateNotSet();
assertNull(mDrawableContainer.getCurrent());
mDrawableContainer.setDither(false);
mDrawableCo... |
Inversion-Mutation | megadiff | "public @Nonnull Org authenticate(boolean force) throws CloudException, InternalException {
Cache<Org> cache = Cache.getInstance(provider, "vCloudOrgs", Org.class, CacheLevel.CLOUD_ACCOUNT, new TimePeriod<Minute>(25, TimePeriod.MINUTE));
ProviderContext ctx = provider.getContext();
if( ctx ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "authenticate" | "public @Nonnull Org authenticate(boolean force) throws CloudException, InternalException {
Cache<Org> cache = Cache.getInstance(provider, "vCloudOrgs", Org.class, CacheLevel.CLOUD_ACCOUNT, new TimePeriod<Minute>(25, TimePeriod.MINUTE));
ProviderContext ctx = provider.getContext();
if( ctx ... |
Inversion-Mutation | megadiff | "public static Object tryToMakeCompatible(
final boolean isPrimitive,
final boolean isArray,
final Class<?> paramType,
final Class<?> paramTypeComponentType,
final Object param)
throws Exception
{
if (param == null ||
param... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tryToMakeCompatible" | "public static Object tryToMakeCompatible(
final boolean isPrimitive,
final boolean isArray,
final Class<?> paramType,
final Class<?> paramTypeComponentType,
final Object param)
throws Exception
{
if (param == null ||
param... |
Inversion-Mutation | megadiff | "@Override
public boolean onOptionsItemSelected(MenuItem item) {
boolean handled = false ;
switch ( item.getItemId() ) {
case MENU_TOGGLE:
if( this.mLoggerServiceManager.isLogging() )
{
this.mLoggerServiceManager.stopGPSLoggerService();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onOptionsItemSelected" | "@Override
public boolean onOptionsItemSelected(MenuItem item) {
boolean handled = false ;
switch ( item.getItemId() ) {
case MENU_TOGGLE:
if( this.mLoggerServiceManager.isLogging() )
{
this.mLoggerServiceManager.stopGPSLoggerService();
... |
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) mModule.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) mModule.showPopup(mPopup);
}
... |
Inversion-Mutation | megadiff | "private void bindMailboxItem(View view, Context context, Cursor cursor, boolean isLastChild)
{
// Reset the view (in case it was recycled) and prepare for binding
AccountFolderListItem itemView = (AccountFolderListItem) view;
itemView.bindViewInit(this, false);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "bindMailboxItem" | "private void bindMailboxItem(View view, Context context, Cursor cursor, boolean isLastChild)
{
// Reset the view (in case it was recycled) and prepare for binding
AccountFolderListItem itemView = (AccountFolderListItem) view;
itemView.bindViewInit(this, false);
... |
Inversion-Mutation | megadiff | "List<String> getOutputAsList() {
psout.flush();
String carray[] = baout.toString().split("\\n");
List<String> tmp = Arrays.asList(carray);
return tmp;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getOutputAsList" | "List<String> getOutputAsList() {
<MASK>String carray[] = baout.toString().split("\\n");</MASK>
psout.flush();
List<String> tmp = Arrays.asList(carray);
return tmp;
}" |
Inversion-Mutation | megadiff | "@FireExtended
public void setDTG_End(final HiResDate newEnd)
{
// ok, how far is this from the current end
long delta = newEnd.getMicros() - endDTG().getMicros();
// right, do we need to prune a few off?
if (delta < 0)
{
// right, we're shortening the track.
// check the end point is after... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setDTG_End" | "@FireExtended
public void setDTG_End(final HiResDate newEnd)
{
// ok, how far is this from the current end
long delta = newEnd.getMicros() - endDTG().getMicros();
// right, do we need to prune a few off?
if (delta < 0)
{
// right, we're shortening the track.
// check the end point is after... |
Inversion-Mutation | megadiff | "void doResetRecords() {
if (migrating) {
throw new RuntimeException("Migration is already in progress");
}
InitialState initialState = new InitialState();
Collection<CMap> cmaps = maps.values();
for (final CMap cmap : cmaps) {
initialState.createA... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doResetRecords" | "void doResetRecords() {
if (migrating) {
throw new RuntimeException("Migration is already in progress");
}
<MASK>migrating = true;</MASK>
InitialState initialState = new InitialState();
Collection<CMap> cmaps = maps.values();
for (final CMap cmap : cma... |
Inversion-Mutation | megadiff | "protected List<ResultConfig> buildResultConfigs(Class<?> clazz, PackageConfig.Builder pcb) {
List<ResultConfig> configs = CollectUtils.newArrayList();
// load annotation results
Result[] results = new Result[0];
Results rs = clazz.getAnnotation(Results.class);
if (null == rs) {
org.bean... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildResultConfigs" | "protected List<ResultConfig> buildResultConfigs(Class<?> clazz, PackageConfig.Builder pcb) {
List<ResultConfig> configs = CollectUtils.newArrayList();
// load annotation results
Result[] results = new Result[0];
Results rs = clazz.getAnnotation(Results.class);
if (null == rs) {
org.bean... |
Inversion-Mutation | megadiff | "public void getTitle() {
StringBuilder sb = new StringBuilder();
String pageTitle = (String) request.getAttribute(SESSION_PAGE_TITLE);
if (StringUtils.isNotEmpty(pageTitle)) {
sb.append(" | ");
sb.append(pageTitle);
}
sb.append(context.getServletContext().getServletContextName());
String t... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getTitle" | "public void getTitle() {
StringBuilder sb = new StringBuilder();
<MASK>sb.append(context.getServletContext().getServletContextName());</MASK>
String pageTitle = (String) request.getAttribute(SESSION_PAGE_TITLE);
if (StringUtils.isNotEmpty(pageTitle)) {
sb.append(" | ");
sb.append(pageTitle);
}
... |
Inversion-Mutation | megadiff | "public WidgetDataEvents addControls(Composite parent,
final Listener statusListener) {
Composite configCom = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(3, false);
configCom.setLayout(layout);
configCom.setLayoutData(new GridData(GridData.FILL_BOTH));
// custom package na... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addControls" | "public WidgetDataEvents addControls(Composite parent,
final Listener statusListener) {
Composite configCom = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(3, false);
configCom.setLayout(layout);
configCom.setLayoutData(new GridData(GridData.FILL_BOTH));
// custom package na... |
Inversion-Mutation | megadiff | "public PactProgram(File jarFile, String className, String... args)
throws ProgramInvocationException {
this.jarFile = jarFile;
this.args = args;
this.assemblerClass = getPactAssemblerFromJar(jarFile, className);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PactProgram" | "public PactProgram(File jarFile, String className, String... args)
throws ProgramInvocationException {
<MASK>this.assemblerClass = getPactAssemblerFromJar(jarFile, className);</MASK>
this.jarFile = jarFile;
this.args = args;
}" |
Inversion-Mutation | megadiff | "public int numberOfLeadingOnes() {
int ones = 0;
for (boolean bit : string) {
if (!bit) return ones;
ones++;
}
return ones;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "numberOfLeadingOnes" | "public int numberOfLeadingOnes() {
int ones = 0;
for (boolean bit : string) {
<MASK>ones++;</MASK>
if (!bit) return ones;
}
return ones;
}" |
Inversion-Mutation | megadiff | "private List<AggregationRecord> getAggregationResults() throws SQLException {
log.debug("getAggregationResults(): <<<");
log.debug("Getting user list");
String unq = "select distinct client from networks";
List<Integer> clients = new ArrayList<Integer>();
PreparedStatem... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAggregationResults" | "private List<AggregationRecord> getAggregationResults() throws SQLException {
log.debug("getAggregationResults(): <<<");
log.debug("Getting user list");
String unq = "select distinct client from networks";
List<Integer> clients = new ArrayList<Integer>();
PreparedStatem... |
Inversion-Mutation | megadiff | "public Event handleEvent (Event event) {
switch (event.getEventType()) {
case START_BATCH:
firstOutputCreated = false;
if ( params.getOutputFormat().equals(Parameters.FORMAT_PO) ) {
outputType = PO_OUTPUT;
createPOWriter();
}
else if ( params.getOutputFormat().equals(Parameters.FORMAT_T... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleEvent" | "public Event handleEvent (Event event) {
switch (event.getEventType()) {
case START_BATCH:
firstOutputCreated = false;
if ( params.getOutputFormat().equals(Parameters.FORMAT_PO) ) {
outputType = PO_OUTPUT;
createPOWriter();
}
else if ( params.getOutputFormat().equals(Parameters.FORMAT_T... |
Inversion-Mutation | megadiff | "public boolean processBitstream(Context c, Item item, Bitstream source, boolean overWrite)
throws Exception
{
// get bitstream filename, calculate destination filename
String newName = getFilteredName(source.getName());
Bitstream existingBitstream = null; // is there an e... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processBitstream" | "public boolean processBitstream(Context c, Item item, Bitstream source, boolean overWrite)
throws Exception
{
// get bitstream filename, calculate destination filename
String newName = getFilteredName(source.getName());
Bitstream existingBitstream = null; // is there an e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.