type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "public void openModeler() {
try{
ModelerHelper.getInstance().createModelerTabFromOutputStep();
SpoonPerspectiveManager.getInstance().activatePerspective(AgileBiPerspective.class);
} catch(Exception e){
e.printStackTrace();
SpoonFactory.getInstance().messageBox( "Could n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "openModeler" | "public void openModeler() {
try{
<MASK>SpoonPerspectiveManager.getInstance().activatePerspective(AgileBiPerspective.class);</MASK>
ModelerHelper.getInstance().createModelerTabFromOutputStep();
} catch(Exception e){
e.printStackTrace();
SpoonFactory.getInstance().message... |
Inversion-Mutation | megadiff | "@Override
protected void onPause() {
super.onPause();
updateModel();
String action = getIntent().getAction();
if (origDay.equals(day) && !Intent.ACTION_INSERT.equals(action)) {
return;
}
try {
DayAccess.getInstance().insertOrUpdate(day);
DayAccess.getInstance().recalculate(this, day);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPause" | "@Override
protected void onPause() {
updateModel();
String action = getIntent().getAction();
if (origDay.equals(day) && !Intent.ACTION_INSERT.equals(action)) {
return;
}
try {
DayAccess.getInstance().insertOrUpdate(day);
DayAccess.getInstance().recalculate(this, day);
// Cursor cursor... |
Inversion-Mutation | megadiff | "@Override
public int available() throws IOException{
if(_i == _currentLine.length){
if(++_rid == _numrows){
_ab = null;
int abytes = super.available();
if(abytes <= 0) return abytes;
_numrows = _ary.rpc(_chkidx-1);
_rid = 0;
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "available" | "@Override
public int available() throws IOException{
if(_i == _currentLine.length){
if(++_rid == _numrows){
_ab = null;
int abytes = super.available();
if(abytes <= 0) return abytes;
_numrows = _ary.rpc(_chkidx-1);
_rid = 0;
}
... |
Inversion-Mutation | megadiff | "@Override
public void write(Cluster cluster) throws IOException {
StringBuilder line = new StringBuilder();
line.append(createNode(String.valueOf(cluster.getId())));
List<WeightedVectorWritable> points = getClusterIdToPoints().get(cluster.getId());
if (points != null) {
for (WeightedVecto... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "write" | "@Override
public void write(Cluster cluster) throws IOException {
StringBuilder line = new StringBuilder();
line.append(createNode(String.valueOf(cluster.getId())));
List<WeightedVectorWritable> points = getClusterIdToPoints().get(cluster.getId());
if (points != null) {
for (WeightedVecto... |
Inversion-Mutation | megadiff | "public void childAdded(final TaskChild child, final boolean userThread) throws InvalidTransactionStateException {
assert ! holdsLock(this);
int state;
synchronized (this) {
state = this.state;
if (stateIsIn(state, STATE_EXECUTE_WAIT, STATE_EXECUTE)) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "childAdded" | "public void childAdded(final TaskChild child, final boolean userThread) throws InvalidTransactionStateException {
assert ! holdsLock(this);
int state;
synchronized (this) {
<MASK>children.add(child);</MASK>
state = this.state;
if (stateIsIn(state, STATE... |
Inversion-Mutation | megadiff | "public void join(Player player) {
if (player.hasPermission("deathswap.join")) {
String name = player.getName();
if (!plugin.game.contains(name) && !plugin.lobby.contains(name)) {
plugin.utility.message("You joined the game!", player);
plugin.lobby.a... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "join" | "public void join(Player player) {
if (player.hasPermission("deathswap.join")) {
String name = player.getName();
if (!plugin.game.contains(name) && !plugin.lobby.contains(name)) {
plugin.utility.message("You joined the game!", player);
<MASK>plugin.ut... |
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 boolean performAction() {
NewSearchUI.activateSearchResultView();
NewSearchUI.runQueryInBackground(getSearchQuery());
return true;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "performAction" | "public boolean performAction() {
<MASK>NewSearchUI.runQueryInBackground(getSearchQuery());</MASK>
NewSearchUI.activateSearchResultView();
return true;
}" |
Inversion-Mutation | megadiff | "FieldEnumerator(Field f) throws VisADException, RemoteException {
field = f;
if (field.getDomainSet() == null) {
throw new FieldException("FieldImplEnumerator: DomainSet undefined");
}
index = new int[1];
index[0] = 0;
dimension = field.getDomainSet().getDimension();
type = (... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "FieldEnumerator" | "FieldEnumerator(Field f) throws VisADException, RemoteException {
if (field.getDomainSet() == null) {
throw new FieldException("FieldImplEnumerator: DomainSet undefined");
}
<MASK>field = f;</MASK>
index = new int[1];
index[0] = 0;
dimension = field.getDomainSet().getDimension();
... |
Inversion-Mutation | megadiff | "@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(resultCode, requestCode, data);
if (resultCode == Activity.RESULT_FIRST_USER && requestCode == SETTINGS_ACTIVITY) {
if (data.getExtras().getBoolean("Exit", false)) {
exit();
} else {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onActivityResult" | "@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(resultCode, requestCode, data);
if (resultCode == Activity.RESULT_FIRST_USER && requestCode == SETTINGS_ACTIVITY) {
if (data.getExtras().getBoolean("Exit", false)) {
exit();
} else {
... |
Inversion-Mutation | megadiff | "public void doCreateTables(TransactionContext c) throws SQLException, IOException {
Statement s = null;
try {
// Check to see if the table already exists. If it does, then don't
// log warnings during startup.
// Need to run the scripts anyways since they may co... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doCreateTables" | "public void doCreateTables(TransactionContext c) throws SQLException, IOException {
Statement s = null;
try {
// Check to see if the table already exists. If it does, then don't
// log warnings during startup.
// Need to run the scripts anyways since they may co... |
Inversion-Mutation | megadiff | "public void interruped(String name) {
if (players.size() <= 1) {
return;
}
Iterator<Player> iter = players.iterator();
Player thePlayer = null;
Integer lowestScore = null;
while (iter.hasNext()) {
Player player = iter.next();
if (player.getName().equals(name)) {
thePlayer = player;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "interruped" | "public void interruped(String name) {
if (players.size() <= 1) {
return;
}
Iterator<Player> iter = players.iterator();
Player thePlayer = null;
Integer lowestScore = null;
while (iter.hasNext()) {
Player player = iter.next();
if (player.getName().equals(name)) {
thePlayer = player;
... |
Inversion-Mutation | megadiff | "@Override
public void execute(String commandString, ConnectionContext context) throws IOException
{
context.getSession().quit();
context.sendResponse("221 Bye");
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "@Override
public void execute(String commandString, ConnectionContext context) throws IOException
{
<MASK>context.sendResponse("221 Bye");</MASK>
context.getSession().quit();
}" |
Inversion-Mutation | megadiff | "public SwingController(final PluginInfo pluginInfo,
final IdentityManager identityManager,
final PluginManager pluginManager,
final ActionManager actionManager) {
super();
this.pluginInfo = pluginInfo;
this.identityManager = identityManager;
th... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "SwingController" | "public SwingController(final PluginInfo pluginInfo,
final IdentityManager identityManager,
final PluginManager pluginManager,
final ActionManager actionManager) {
super();
this.pluginInfo = pluginInfo;
this.identityManager = identityManager;
th... |
Inversion-Mutation | megadiff | "@Override
public PlsSolution[] run(PlsSolution plsSol, long timeToFinish, Random rand) {
VrpPlsSolution solAndStuff = (VrpPlsSolution)plsSol;
long startTime = System.currentTimeMillis();
VrpSolution sol = solAndStuff.getSolution();
VrpProblem problem = sol.getProblem();
LnsRelaxer relaxer = ne... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public PlsSolution[] run(PlsSolution plsSol, long timeToFinish, Random rand) {
VrpPlsSolution solAndStuff = (VrpPlsSolution)plsSol;
long startTime = System.currentTimeMillis();
VrpSolution sol = solAndStuff.getSolution();
VrpProblem problem = sol.getProblem();
LnsRelaxer relaxer = ne... |
Inversion-Mutation | megadiff | "public GenericJDBCDataModel(Properties props) throws TasteException {
super(AbstractJDBCComponent.lookupDataSource(props.getProperty(DATA_SOURCE_KEY)),
props.getProperty(GET_PREFERENCE_SQL_KEY),
props.getProperty(GET_PREFERENCE_TIME_SQL_KEY),
props.getProperty(GET_USER_SQL_KEY),
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "GenericJDBCDataModel" | "public GenericJDBCDataModel(Properties props) throws TasteException {
super(AbstractJDBCComponent.lookupDataSource(props.getProperty(DATA_SOURCE_KEY)),
props.getProperty(GET_PREFERENCE_SQL_KEY),
props.getProperty(GET_PREFERENCE_TIME_SQL_KEY),
props.getProperty(GET_USER_SQL_KEY),
... |
Inversion-Mutation | megadiff | "protected void displayErrorMessage( String message )
{
setMessage( null, DialogPage.NONE );
setErrorMessage( message );
setPageComplete( message == null );
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "displayErrorMessage" | "protected void displayErrorMessage( String message )
{
<MASK>setErrorMessage( message );</MASK>
setMessage( null, DialogPage.NONE );
setPageComplete( message == null );
}" |
Inversion-Mutation | megadiff | "public boolean visit(QualifiedName node) {
if (!isActive()) {
return false;
}
if (hasErrors()) {
return true;
}
IBinding binding = node.resolveBinding();
switch (binding.getKind()) {
case IBinding.TYPE:
node.getName().accept(this);
break;
case IBinding.VARIABLE:
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visit" | "public boolean visit(QualifiedName node) {
if (!isActive()) {
return false;
}
if (hasErrors()) {
return true;
}
IBinding binding = node.resolveBinding();
switch (binding.getKind()) {
case IBinding.TYPE:
node.getName().accept(this);
break;
case IBinding.VARIABLE:
... |
Inversion-Mutation | megadiff | "private void notifyDownloadCompleted(
State state, int finalStatus, String errorMsg, int numFailed) {
notifyThroughDatabase(state, finalStatus, errorMsg, numFailed);
if (Downloads.Impl.isStatusCompleted(finalStatus)) {
mInfo.sendIntentIfRequested();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "notifyDownloadCompleted" | "private void notifyDownloadCompleted(
State state, int finalStatus, String errorMsg, int numFailed) {
if (Downloads.Impl.isStatusCompleted(finalStatus)) {
mInfo.sendIntentIfRequested();
}
<MASK>notifyThroughDatabase(state, finalStatus, errorMsg, numFailed);</MASK>
... |
Inversion-Mutation | megadiff | "@Override
protected void configure() {
DynamicMap.mapOf(binder(), PROJECT_KIND);
DynamicMap.mapOf(binder(), DASHBOARD_KIND);
get(PROJECT_KIND).to(GetProject.class);
get(PROJECT_KIND, "description").to(GetDescription.class);
put(PROJECT_KIND, "description").to(SetDescription.class);
d... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "configure" | "@Override
protected void configure() {
DynamicMap.mapOf(binder(), PROJECT_KIND);
DynamicMap.mapOf(binder(), DASHBOARD_KIND);
get(PROJECT_KIND).to(GetProject.class);
get(PROJECT_KIND, "description").to(GetDescription.class);
put(PROJECT_KIND, "description").to(SetDescription.class);
d... |
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 | "public void build() throws Exception {
names = new Hashtable();
int access = superclass.getModifiers();
if ((access & Modifier.FINAL) != 0) {
throw new InstantiationException("can't subclass final class");
}
access = Modifier.PUBLIC | Modifier.SYNCHRONIZED;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "build" | "public void build() throws Exception {
names = new Hashtable();
int access = superclass.getModifiers();
if ((access & Modifier.FINAL) != 0) {
throw new InstantiationException("can't subclass final class");
}
access = Modifier.PUBLIC | Modifier.SYNCHRONIZED;
... |
Inversion-Mutation | megadiff | "protected void parseLine(String nextLine) throws ReaderException {
Scanner scanner = new Scanner(nextLine.trim());
// allow any whitespace
String next = scanner.next();
if (next.isEmpty()) {
return;
}
if (next.equals("WorkflowBundle")) {
level = Level.WorkflowBundle;
String name = parse... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseLine" | "protected void parseLine(String nextLine) throws ReaderException {
Scanner scanner = new Scanner(nextLine.trim());
// allow any whitespace
String next = scanner.next();
if (next.isEmpty()) {
return;
}
if (next.equals("WorkflowBundle")) {
level = Level.WorkflowBundle;
String name = parse... |
Inversion-Mutation | megadiff | "public static Drawable getAvatarFromAddress(ContentResolver cr, String address, int width, int height) {
String[] projection = {Imps.Contacts.AVATAR_DATA};
String[] args = {address};
String query = "username LIKE ?";
Cursor cursor = cr.query(Imps.Contacts.CONTENT_URI,proj... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAvatarFromAddress" | "public static Drawable getAvatarFromAddress(ContentResolver cr, String address, int width, int height) {
String[] projection = {Imps.Contacts.AVATAR_DATA};
String[] args = {address};
String query = "username LIKE ?";
Cursor cursor = cr.query(Imps.Contacts.CONTENT_URI,proj... |
Inversion-Mutation | megadiff | "public void handleMethod(String id, String method, Object[] parameters) {
ClientCommand.COMMAND cmd = Enum.valueOf(ClientCommand.COMMAND.class, method);
//System.out.println("ClientMethodHandler#handleMethod: " + cmd.name());
GUID zoneGUID;
Zone zone;
sw... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleMethod" | "public void handleMethod(String id, String method, Object[] parameters) {
ClientCommand.COMMAND cmd = Enum.valueOf(ClientCommand.COMMAND.class, method);
//System.out.println("ClientMethodHandler#handleMethod: " + cmd.name());
GUID zoneGUID;
Zone zone;
sw... |
Inversion-Mutation | megadiff | "private void viewForm(HttpServletRequest req, HttpServletResponse resp,
List<String> errors, String success_message)
throws ServletException, IOException {
DataTrain train = DataTrain.depart();
User currentUser = train.auth().getCurrentUser(req.getSession());
Form form = null;
try {
long id = L... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "viewForm" | "private void viewForm(HttpServletRequest req, HttpServletResponse resp,
List<String> errors, String success_message)
throws ServletException, IOException {
DataTrain train = DataTrain.depart();
User currentUser = train.auth().getCurrentUser(req.getSession());
Form form = null;
try {
long id = L... |
Inversion-Mutation | megadiff | "@Override
public void visitOverrideClassVar(JFXOverrideClassVar tree) {
//TODO: handle static triggers
JFXIdent id = tree.getId();
JFXOnReplace onr = tree.getOnReplace();
// let the owner of the environment be a freshly
// created BLOCK-method.
JavafxEnv<Jav... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visitOverrideClassVar" | "@Override
public void visitOverrideClassVar(JFXOverrideClassVar tree) {
//TODO: handle static triggers
JFXIdent id = tree.getId();
JFXOnReplace onr = tree.getOnReplace();
// let the owner of the environment be a freshly
// created BLOCK-method.
JavafxEnv<Jav... |
Inversion-Mutation | megadiff | "public MendelDialog (HaploView h, String title) {
super(h,title);
JPanel contents = new JPanel();
JTable table;
contents.setLayout(new BoxLayout(contents,BoxLayout.Y_AXIS));
Vector results = h.theData.getPedFile().getResults();
Vector colNames = new Vector(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MendelDialog" | "public MendelDialog (HaploView h, String title) {
super(h,title);
JPanel contents = new JPanel();
JTable table;
contents.setLayout(new BoxLayout(contents,BoxLayout.Y_AXIS));
Vector results = h.theData.getPedFile().getResults();
Vector colNames = new Vector(... |
Inversion-Mutation | megadiff | "protected KeyValueStore createStoreConnection(String uri)
throws IOException, KeyValueStoreUnavailable {
Matcher m = urlPattern.matcher(uri);
if (!m.matches())
throw new IllegalArgumentException(
String
.format(
"The url pattern %1$s does not match type://hostname:port?args...",
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createStoreConnection" | "protected KeyValueStore createStoreConnection(String uri)
throws IOException, KeyValueStoreUnavailable {
Matcher m = urlPattern.matcher(uri);
if (!m.matches())
throw new IllegalArgumentException(
String
.format(
"The url pattern %1$s does not match type://hostname:port?args...",
... |
Inversion-Mutation | megadiff | "void doGet( URL url, WagonExchange exchange, boolean doGet )
throws Exception
{
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestProperty( "Accept-Encoding", "gzip" );
if ( !_wagon.getUseCache() )
{
urlConnection.setRequest... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doGet" | "void doGet( URL url, WagonExchange exchange, boolean doGet )
throws Exception
{
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestProperty( "Accept-Encoding", "gzip" );
if ( !_wagon.getUseCache() )
{
urlConnection.setRequest... |
Inversion-Mutation | megadiff | "private static void testStatementRemembersTimeout(PreparedStatement ps)
throws SQLException, TestFailedException
{
String name = (ps instanceof CallableStatement) ?
"CallableStatement" : "PreparedStatement";
System.out.println("Testing that " + name + " remembers timeout.")... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testStatementRemembersTimeout" | "private static void testStatementRemembersTimeout(PreparedStatement ps)
throws SQLException, TestFailedException
{
String name = (ps instanceof CallableStatement) ?
"CallableStatement" : "PreparedStatement";
System.out.println("Testing that " + name + " remembers timeout.")... |
Inversion-Mutation | megadiff | "protected Library readExternalLibraryFromFilename(String theFileName, FileType defaultType,
IconParameters iconParams)
{
// get the path to the library file
String legalLibName = TextUtils.getFileNameWithoutExtension(theFileName, true);
// Checkin... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readExternalLibraryFromFilename" | "protected Library readExternalLibraryFromFilename(String theFileName, FileType defaultType,
IconParameters iconParams)
{
// get the path to the library file
String legalLibName = TextUtils.getFileNameWithoutExtension(theFileName, true);
// Checkin... |
Inversion-Mutation | megadiff | "public void create() {
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate(" CREATE TABLE waveformdb "+
" ( waveformeventid int, "+
" numnetworks int, "+
" CONSTRAINT nfkey FOREIGN KEY(waveformeventid) REFERENCES eventconfig(eventid)) ");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "create" | "public void create() {
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate(" CREATE TABLE waveformdb "+
" ( waveformeventid int, "+
" numnetworks int, "+
" CONSTRAINT nfkey FOREIGN KEY(waveformeventid) REFERENCES eventconfig(eventid)) ");
... |
Inversion-Mutation | megadiff | "public void start() {
try {
java.lang.Thread.sleep(1000);
origim.publish(origI);
origim.publish(procI);
} catch (Exception e) {
e.printStackTrace();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "public void start() {
try {
origim.publish(origI);
origim.publish(procI);
<MASK>java.lang.Thread.sleep(1000);</MASK>
} catch (Exception e) {
e.printStackTrace();
}
}" |
Inversion-Mutation | megadiff | "@Override
public void execute(String commandString, ConnectionContext context) throws IOException
{
Session session = context.getSession();
if (!session.getHasSender())
{
context.sendResponse("503 Error: need MAIL command");
return;
}
else if (session.getRecipientCount() == 0)
{
con... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "@Override
public void execute(String commandString, ConnectionContext context) throws IOException
{
Session session = context.getSession();
if (!session.getHasSender())
{
context.sendResponse("503 Error: need MAIL command");
return;
}
else if (session.getRecipientCount() == 0)
{
con... |
Inversion-Mutation | megadiff | "@Test
public void testJournalRecords() throws Exception {
store1();
_persistit.flush();
final Transaction txn = _persistit.getTransaction();
final Volume volume = _persistit.getVolume(_volumeName);
volume.resetHandle();
final JournalManager jman = new Jou... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testJournalRecords" | "@Test
public void testJournalRecords() throws Exception {
store1();
_persistit.flush();
final Transaction txn = _persistit.getTransaction();
final Volume volume = _persistit.getVolume(_volumeName);
volume.resetHandle();
<MASK>volume.getTree("JournalManagerTe... |
Inversion-Mutation | megadiff | "@Override
protected void onPostExecute(Cursor cursor) {
final Activity activity = mActivity.get();
showResult(cursor);
if (activity != null && dialog != null) {
dialog.dismiss();
dialog = null;
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPostExecute" | "@Override
protected void onPostExecute(Cursor cursor) {
final Activity activity = mActivity.get();
if (activity != null && dialog != null) {
dialog.dismiss();
dialog = null;
}
<MASK>showResult(cursor);</MASK>
}" |
Inversion-Mutation | megadiff | "public static void capture (Layer layer, Canvas canvas) {
if (!layer.visible()) return;
canvas.save();
concatTransform(canvas, layer.transform());
canvas.translate(-layer.originX(), -layer.originY());
if (layer instanceof GroupLayer) {
GroupLayer gl = (Gro... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "capture" | "public static void capture (Layer layer, Canvas canvas) {
if (!layer.visible()) return;
canvas.save();
<MASK>canvas.translate(-layer.originX(), -layer.originY());</MASK>
concatTransform(canvas, layer.transform());
if (layer instanceof GroupLayer) {
GroupLa... |
Inversion-Mutation | megadiff | "public void castSpell(Player player)
{
if (checkInventoryRequirements(player.getInventory())) // They have the required items.
{
Block targetBlock = player.getTargetBlock(null, 101);
if ((targetBlock.getType() != Material.AIR) && (targetBlock.getType() != Material.BEDROCK)) // Can't do it to air ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "castSpell" | "public void castSpell(Player player)
{
if (checkInventoryRequirements(player.getInventory())) // They have the required items.
{
Block targetBlock = player.getTargetBlock(null, 101);
if ((targetBlock.getType() != Material.AIR) && (targetBlock.getType() != Material.BEDROCK)) // Can't do it to air ... |
Inversion-Mutation | megadiff | "public void run() {
try {
serverLog.logInfo("URLDBCLEANER", "UrldbCleaner-Thread startet");
final Iterator eiter = entries(true, false, null);
while (eiter.hasNext() && run) {
synchronized (this) {
if (this.pa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
try {
serverLog.logInfo("URLDBCLEANER", "UrldbCleaner-Thread startet");
final Iterator eiter = entries(true, false, null);
while (eiter.hasNext() && run) {
synchronized (this) {
if (this.pa... |
Inversion-Mutation | megadiff | "public HSSFSheet cloneSheet(int sheetIndex) {
validateSheetIndex(sheetIndex);
HSSFSheet srcSheet = (HSSFSheet) _sheets.get(sheetIndex);
String srcName = workbook.getSheetName(sheetIndex);
HSSFSheet clonedSheet = srcSheet.cloneSheet(this);
clonedSheet.setSelected(false);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cloneSheet" | "public HSSFSheet cloneSheet(int sheetIndex) {
validateSheetIndex(sheetIndex);
HSSFSheet srcSheet = (HSSFSheet) _sheets.get(sheetIndex);
String srcName = workbook.getSheetName(sheetIndex);
HSSFSheet clonedSheet = srcSheet.cloneSheet(this);
clonedSheet.setSelected(false);
... |
Inversion-Mutation | megadiff | "private void verifyBlock(Block block) {
BlockSender blockSender = null;
/* In case of failure, attempt to read second time to reduce
* transient errors. How do we flush block data from kernel
* buffers before the second read?
*/
for (int i=0; i<2; i++) {
boolean second... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "verifyBlock" | "private void verifyBlock(Block block) {
BlockSender blockSender = null;
/* In case of failure, attempt to read second time to reduce
* transient errors. How do we flush block data from kernel
* buffers before the second read?
*/
for (int i=0; i<2; i++) {
boolean second... |
Inversion-Mutation | megadiff | "void doShutdown() {
if (active.compareAndSet(true, false)) {
logger.log(Level.INFO, "HazelcastClient[" + this.id + "] is shutting down.");
out.shutdown();
in.shutdown();
connectionManager.shutdown();
listenerManager.shutdown();
Cli... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doShutdown" | "void doShutdown() {
if (active.compareAndSet(true, false)) {
logger.log(Level.INFO, "HazelcastClient[" + this.id + "] is shutting down.");
<MASK>connectionManager.shutdown();</MASK>
out.shutdown();
in.shutdown();
listenerManager.shutdown();
... |
Inversion-Mutation | megadiff | "public String toHTML() {
StringBuffer text = new StringBuffer();
text.append("<table id=\"toc\">\n<tr>\n<td>\n");
TableOfContentsEntry entry = null;
int adjustedLevel = 0;
int previousLevel = 0;
Iterator tocIterator = this.entries.values().iterator();
while (tocIterator.hasNext()) {
entry = (T... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "toHTML" | "public String toHTML() {
StringBuffer text = new StringBuffer();
text.append("<table id=\"toc\">\n<tr>\n<td>\n");
TableOfContentsEntry entry = null;
int adjustedLevel = 0;
int previousLevel = 0;
Iterator tocIterator = this.entries.values().iterator();
while (tocIterator.hasNext()) {
entry = (T... |
Inversion-Mutation | megadiff | "private void setText(String value) {
Element divChild;
if (getElement().getChild(0).getNodeType() == Node.ELEMENT_NODE) {
divChild = (Element) getElement().getChild(0);
} else {
divChild = DOM.createDiv();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setText" | "private void setText(String value) {
Element divChild;
if (getElement().getChild(0).getNodeType() == Node.ELEMENT_NODE) {
divChild = (Element) getElement().getChild(0);
} else {
divChild = DOM.createDiv();
... |
Inversion-Mutation | megadiff | "public CombinedTool(DrawingEditor editor, Game game) {
tools = new ArrayList<Tool>();
tools.add(new EndTurnTool(editor, game));
tools.add(new ActionTool(editor, game));
tools.add(new InspectTool(editor, game));
tools.add(new MoveTool(editor, game));
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "CombinedTool" | "public CombinedTool(DrawingEditor editor, Game game) {
tools = new ArrayList<Tool>();
<MASK>tools.add(new MoveTool(editor, game));</MASK>
tools.add(new EndTurnTool(editor, game));
tools.add(new ActionTool(editor, game));
tools.add(new InspectTool(editor, game));
}" |
Inversion-Mutation | megadiff | "@Override
public void onCreate() {
mConnectivityManager = new EmailConnectivityManager(this, TAG);
// Start up our service thread
new Thread(this, "AttachmentDownloadService").start();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate() {
// Start up our service thread
new Thread(this, "AttachmentDownloadService").start();
<MASK>mConnectivityManager = new EmailConnectivityManager(this, TAG);</MASK>
}" |
Inversion-Mutation | megadiff | "void doMouseClicked(MouseEvent me)
{
TreePath path = arbre.getPathForLocation(me.getX(), me.getY());
/*
* Exemple path
* [null, site, test.html, titre 1]
*/
if (path != null)
{
Object[] tabObj = path.getPath();
int location = path.getPathCount();
/*
* Exemple Location :... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doMouseClicked" | "void doMouseClicked(MouseEvent me)
{
TreePath path = arbre.getPathForLocation(me.getX(), me.getY());
/*
* Exemple path
* [null, site, test.html, titre 1]
*/
<MASK>Object[] tabObj = path.getPath();</MASK>
if (path != null)
{
int location = path.getPathCount();
/*
* Exempl... |
Inversion-Mutation | megadiff | "public boolean matchOrder(Order newOrder) {
int i = 0;
for (Order oldOrder: orders) {
i += 1;
//log.info("oldOrder: " + oldOrder);
//log.info("newOrder: " + newOrder);
// Are they giving what anyone else wants?
if (!ItemQuery.isSame... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "matchOrder" | "public boolean matchOrder(Order newOrder) {
int i = 0;
for (Order oldOrder: orders) {
i += 1;
//log.info("oldOrder: " + oldOrder);
//log.info("newOrder: " + newOrder);
// Are they giving what anyone else wants?
if (!ItemQuery.isSame... |
Inversion-Mutation | megadiff | "public void start() {
InitClass initClass = new InitClass(this);
Thread t = new Thread(initClass);
t.setPriority(Thread.MIN_PRIORITY);
t.start();
logger.getParent().addAppender(appender);
System.setProperty("java.security.auth.login.config", Thread.currentThread().getContextClassLoa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "public void start() {
InitClass initClass = new InitClass(this);
Thread t = new Thread(initClass);
t.setPriority(Thread.MIN_PRIORITY);
t.start();
logger.getParent().addAppender(appender);
System.setProperty("java.security.auth.login.config", Thread.currentThread().getContextClassLoa... |
Inversion-Mutation | megadiff | "public void reviewNotifications(Date today)
throws NamingException, FinderException, SQLException, Exception {
NotificationSessionLocalHome notificationHome =
(NotificationSessionLocalHome) EJBFactory.lookUpLocalHome(
NotificationSessionLocalHome.class,
Notifica... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "reviewNotifications" | "public void reviewNotifications(Date today)
throws NamingException, FinderException, SQLException, Exception {
NotificationSessionLocalHome notificationHome =
(NotificationSessionLocalHome) EJBFactory.lookUpLocalHome(
NotificationSessionLocalHome.class,
Notifica... |
Inversion-Mutation | megadiff | "public void run()
{
try
{
log.info("Starting Thread " + threadId);
synchronized (startSemaphore)
{
if (!started)
{
startSemaphore.wait();
}
}
//log.info("Thread... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run()
{
try
{
log.info("Starting Thread " + threadId);
synchronized (startSemaphore)
{
if (!started)
{
startSemaphore.wait();
}
}
//log.info("Thread... |
Inversion-Mutation | megadiff | "public void remove() throws IllegalStateException {
if (this.sipHeader == null)
throw new IllegalStateException();
if (toRemove) {
this.sipMessage.removeHeader(sipHeader.getName());
this.sipHeader = null;
} else {
throw new IllegalStateExc... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "remove" | "public void remove() throws IllegalStateException {
if (this.sipHeader == null)
throw new IllegalStateException();
if (toRemove) {
<MASK>this.sipHeader = null;</MASK>
this.sipMessage.removeHeader(sipHeader.getName());
} else {
throw new Il... |
Inversion-Mutation | megadiff | "public Gson create() {
List<TypeAdapter.Factory> factories = new ArrayList<TypeAdapter.Factory>();
factories.addAll(this.factories);
Collections.reverse(factories);
factories.addAll(this.hierarchyFactories);
addTypeAdaptersForDate(datePattern, dateStyle, timeStyle, factories);
return n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "create" | "public Gson create() {
List<TypeAdapter.Factory> factories = new ArrayList<TypeAdapter.Factory>();
<MASK>factories.addAll(this.hierarchyFactories);</MASK>
factories.addAll(this.factories);
Collections.reverse(factories);
addTypeAdaptersForDate(datePattern, dateStyle, timeStyle, factories);
... |
Inversion-Mutation | megadiff | "private Template buildTemplate(ComputeService computeService, BrooklynJcloudsSetupHolder setup) {
TemplateBuilder templateBuilder = (TemplateBuilder) setup.get("templateBuilder");
if (templateBuilder==null)
templateBuilder = new PortableTemplateBuilder();
else
LOG.d... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildTemplate" | "private Template buildTemplate(ComputeService computeService, BrooklynJcloudsSetupHolder setup) {
TemplateBuilder templateBuilder = (TemplateBuilder) setup.get("templateBuilder");
if (templateBuilder==null)
templateBuilder = new PortableTemplateBuilder();
else
LOG.d... |
Inversion-Mutation | megadiff | "@Override
public void handleMessage(Message msg) {
BluetoothAudioGateway.IncomingConnectionInfo info =
(BluetoothAudioGateway.IncomingConnectionInfo)msg.obj;
int type = BluetoothHandsfree.TYPE_UNKNOWN;
switch(msg.what) {
case BluetoothAu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleMessage" | "@Override
public void handleMessage(Message msg) {
BluetoothAudioGateway.IncomingConnectionInfo info =
(BluetoothAudioGateway.IncomingConnectionInfo)msg.obj;
int type = BluetoothHandsfree.TYPE_UNKNOWN;
switch(msg.what) {
case BluetoothAu... |
Inversion-Mutation | megadiff | "public void testInstrumentClass() throws Exception {
assertEquals(6, MyClass.staticSix());
final MyClass c1 = new MyClass();
assertEquals(0, c1.getA());
m_recorderStubFactory.assertNoMoreCalls();
m_instrumenter.createInstrumentedProxy(null, m_recorder, MyClass.class);
m_recorderSt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testInstrumentClass" | "public void testInstrumentClass() throws Exception {
assertEquals(6, MyClass.staticSix());
final MyClass c1 = new MyClass();
assertEquals(0, c1.getA());
m_recorderStubFactory.assertNoMoreCalls();
m_instrumenter.createInstrumentedProxy(null, m_recorder, MyClass.class);
m_recorderSt... |
Inversion-Mutation | megadiff | "@Override
public synchronized void onFailure(FetchException e, ClientGetter state, ObjectContainer container) {
try {
switch(e.getMode()) {
case FetchException.DATA_NOT_FOUND:
try {
WoTMessageList list = (WoTMessageList)mMessageManager.getMessageList(mMessageLists.get(state));
mMessag... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onFailure" | "@Override
public synchronized void onFailure(FetchException e, ClientGetter state, ObjectContainer container) {
try {
switch(e.getMode()) {
case FetchException.DATA_NOT_FOUND:
try {
WoTMessageList list = (WoTMessageList)mMessageManager.getMessageList(mMessageLists.get(state));
mMessag... |
Inversion-Mutation | megadiff | "@EventHandler(priority = EventPriority.NORMAL)
public void onBlockBreak(BlockBreakEvent event){
Block block = event.getBlock();
if ((block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN)) {
Sign s = (Sign)block.getState();
if(!plugin.loc.containsKey(block.getLocation())){
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBlockBreak" | "@EventHandler(priority = EventPriority.NORMAL)
public void onBlockBreak(BlockBreakEvent event){
Block block = event.getBlock();
<MASK>Sign s = (Sign)block.getState();</MASK>
if ((block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN)) {
if(!plugin.loc.containsKey(block.getLocat... |
Inversion-Mutation | megadiff | "@Override
final QueryPart getFunction0(Configuration configuration) {
switch (configuration.getDialect()) {
// Some databases don't accept predicates where column expressions
// are expected.
case CUBRID:
case DB2:
case FIREBIRD:
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getFunction0" | "@Override
final QueryPart getFunction0(Configuration configuration) {
switch (configuration.getDialect()) {
// Some databases don't accept predicates where column expressions
// are expected.
case CUBRID:
case DB2:
case FIREBIRD:
... |
Inversion-Mutation | megadiff | "protected void cleanup(Context ctx) throws IOException, InterruptedException {
super.cleanup(ctx);
instance.maybeCallMethod("cleanup", ctx);
instance.cleanup(ctx.getConfiguration());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cleanup" | "protected void cleanup(Context ctx) throws IOException, InterruptedException {
super.cleanup(ctx);
<MASK>instance.cleanup(ctx.getConfiguration());</MASK>
instance.maybeCallMethod("cleanup", ctx);
}" |
Inversion-Mutation | megadiff | "public void testInspectionWithEqualityNotCountingOnNilParameter() throws Exception {
final RubyDebuggerProxy proxy = prepareProxy(
"class A",
" def ==(obj)",
" obj.non_existent",
" end",
"end",
"a = A.ne... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testInspectionWithEqualityNotCountingOnNilParameter" | "public void testInspectionWithEqualityNotCountingOnNilParameter() throws Exception {
final RubyDebuggerProxy proxy = prepareProxy(
"class A",
" def ==(obj)",
" obj.non_existent",
" end",
"end",
"a = A.ne... |
Inversion-Mutation | megadiff | "public void returnConnection(Channel c)
{
stateCheck(State.RUNNING, State.SHUTTING_DOWN, State.SHUTDOWN, State.HEALTH_CHECKING);
if (!inUse.remove(c))
{
throw new IllegalArgumentException("Channel not managed by this pool");
}
switch(state)
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "returnConnection" | "public void returnConnection(Channel c)
{
stateCheck(State.RUNNING, State.SHUTTING_DOWN, State.SHUTDOWN, State.HEALTH_CHECKING);
if (!inUse.remove(c))
{
throw new IllegalArgumentException("Channel not managed by this pool");
}
switch(state)
... |
Inversion-Mutation | megadiff | "public void configFile(String filename, String newconfig, boolean ignoreErrors) {
this.configname = filename;
Properties props = new Properties();
try {
props.load(new FileInputStream(filename));
long totsize = getSizeProperty(props, "totalsize");
Total... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "configFile" | "public void configFile(String filename, String newconfig, boolean ignoreErrors) {
this.configname = filename;
Properties props = new Properties();
try {
long totsize = getSizeProperty(props, "totalsize");
TotalSizer totals = new TotalSizer(filename, totsize);
... |
Inversion-Mutation | megadiff | "public void testServerTcpClose() throws Exception {
final CountDownLatch latch = new CountDownLatch(2);
final AtomicBoolean clientOK = new AtomicBoolean(false);
final AtomicBoolean serverOK = new AtomicBoolean(false);
doConnectionTest(new Runnable() {
public void run() ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testServerTcpClose" | "public void testServerTcpClose() throws Exception {
final CountDownLatch latch = new CountDownLatch(2);
final AtomicBoolean clientOK = new AtomicBoolean(false);
final AtomicBoolean serverOK = new AtomicBoolean(false);
doConnectionTest(new Runnable() {
public void run() ... |
Inversion-Mutation | megadiff | "@Override
public void executeBatch(List<Tuple> inputs) {
ArrayList<Tuple> tuplesToAck = new ArrayList<Tuple>();
try {
Mutator<String> mutator = HFactory.createMutator(this.keyspace,
new StringSerializer());
for (Tuple input : inputs) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeBatch" | "@Override
public void executeBatch(List<Tuple> inputs) {
ArrayList<Tuple> tuplesToAck = new ArrayList<Tuple>();
try {
Mutator<String> mutator = HFactory.createMutator(this.keyspace,
new StringSerializer());
for (Tuple input : inputs) {
... |
Inversion-Mutation | megadiff | "public DataSourceTableModel(TableEditableElement element) {
this.element = element;
dataSource = element.getDataSource();
dataSourceListener = new ModificationListener();
if(dataSource.isEditable()) {
try {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DataSourceTableModel" | "public DataSourceTableModel(TableEditableElement element) {
this.element = element;
dataSource = element.getDataSource();
dataSourceListener = new ModificationListener();
if(dataSource.isEditable()) {
try {
... |
Inversion-Mutation | megadiff | "protected boolean perRequestFilter(AtmosphereResource r, Entry msg, boolean cache) {
// A broadcaster#broadcast(msg,Set) may contains null value.
if (r == null) {
logger.trace("Null AtmosphereResource passed inside a Set");
return false;
}
if (isAtmospher... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "perRequestFilter" | "protected boolean perRequestFilter(AtmosphereResource r, Entry msg, boolean cache) {
// A broadcaster#broadcast(msg,Set) may contains null value.
if (r == null) {
logger.trace("Null AtmosphereResource passed inside a Set");
return false;
}
if (isAtmospher... |
Inversion-Mutation | megadiff | "public static void main(String[] args) throws IOException {
int seat_num=0;
int[] one_TwoTogether;
one_TwoTogether = new int[300];
int index=1;
int all=0;
int info=0;
int alone=0;
int seatNum_al... | 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 IOException {
int seat_num=0;
int[] one_TwoTogether;
one_TwoTogether = new int[300];
int index=1;
int all=0;
int info=0;
int alone=0;
int seatNum_al... |
Inversion-Mutation | megadiff | "private void findRandomItem(TreeMap<Double, String> randomTreeMap)
{
if(randomTreeMap.size() > 1)
{
randomTreeMap.remove(randomTreeMap.ceilingEntry(Math.random()).getKey());
findRandomItem(randomTreeMap);
}
else
{
return;
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findRandomItem" | "private void findRandomItem(TreeMap<Double, String> randomTreeMap)
{
<MASK>randomTreeMap.remove(randomTreeMap.ceilingEntry(Math.random()).getKey());</MASK>
if(randomTreeMap.size() > 1)
{
findRandomItem(randomTreeMap);
}
else
{
return;
}
}" |
Inversion-Mutation | megadiff | "public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException {
input = container.getInput();
GameState state = game.getCurrentState();
if (!(state instanceof IWorld)) return;
world = (IWorld) game.getCurrentState();
prevMotionX = motionX... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "update" | "public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException {
input = container.getInput();
GameState state = game.getCurrentState();
if (!(state instanceof IWorld)) return;
world = (IWorld) game.getCurrentState();
prevMotionX = motionX... |
Inversion-Mutation | megadiff | "private void getAnagrams(String rack, String start, String contains, String end) {
// Set up the callback object.
AsyncCallback<Result> callback = new AsyncCallback<Result>() {
public void onFailure(Throwable caught) {
view.setError("failure!");
}
public void onSuccess(Result results) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAnagrams" | "private void getAnagrams(String rack, String start, String contains, String end) {
// Set up the callback object.
<MASK>view.setError("Loading...");</MASK>
AsyncCallback<Result> callback = new AsyncCallback<Result>() {
public void onFailure(Throwable caught) {
view.setError("failure!");
}
p... |
Inversion-Mutation | megadiff | "private void connect() throws IOException {
try {
socket = new Socket();
socket.setSoTimeout(timeout); // the timeout value to be used in milliseconds
socket.connect(server);
out = new BufferedOutputStream(socket.getOutputStream());
} catch (IOExce... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "connect" | "private void connect() throws IOException {
try {
socket = new Socket();
<MASK>socket.connect(server);</MASK>
socket.setSoTimeout(timeout); // the timeout value to be used in milliseconds
out = new BufferedOutputStream(socket.getOutputStream());
} ... |
Inversion-Mutation | megadiff | "protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
UrlMappingsHolder holder = lookupUrlMappings();
GrailsApplication application = lookupApplication();
GrailsWebRequest webRequest = (Grails... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doFilterInternal" | "protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
UrlMappingsHolder holder = lookupUrlMappings();
GrailsApplication application = lookupApplication();
GrailsWebRequest webRequest = (Grails... |
Inversion-Mutation | megadiff | "@Override
protected JComponent createRightComponent() {
JPanel p = new JPanel();
btnSetAdminPass = new JButton("Set Admin Password");
btnSetAdminPass.setOpaque(false);
btnSetLockPass = new JButton("Set Unlock Password");
btnSetLockPass.setOpaque(false);
p.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createRightComponent" | "@Override
protected JComponent createRightComponent() {
JPanel p = new JPanel();
btnSetAdminPass = new JButton("Set Admin Password");
btnSetAdminPass.setOpaque(false);
btnSetLockPass = new JButton("Set Unlock Password");
btnSetLockPass.setOpaque(false);
p.... |
Inversion-Mutation | megadiff | "@Override
public void toggleState(Context context) {
boolean enabled = getDataState(context);
SharedPreferences preferences = context.getSharedPreferences(WidgetSettings.WIDGET_PREF_MAIN,
Context.MODE_PRIVATE);
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTI... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "toggleState" | "@Override
public void toggleState(Context context) {
boolean enabled = getDataState(context);
SharedPreferences preferences = context.getSharedPreferences(WidgetSettings.WIDGET_PREF_MAIN,
Context.MODE_PRIVATE);
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTI... |
Inversion-Mutation | megadiff | "public Graphemeui() {
description = new Description();
canvas = new Canvas(this);
chat = Chat.getInstance(this);
drawing = new DrawingImpl();
tools = new Toolbox(this);
graphManagerFactory = GraphManager2dFactory.getInstance();
graphManager = graphManager... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Graphemeui" | "public Graphemeui() {
description = new Description();
<MASK>tools = new Toolbox(this);</MASK>
canvas = new Canvas(this);
chat = Chat.getInstance(this);
drawing = new DrawingImpl();
graphManagerFactory = GraphManager2dFactory.getInstance();
graphManager =... |
Inversion-Mutation | megadiff | "protected void scanPIData(String target, XMLString data)
throws IOException, XNIException {
// check target
if (target.length() == 3) {
char c0 = Character.toLowerCase(target.charAt(0));
char c1 = Character.toLowerCase(target.charAt(1));
char c2 = Ch... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "scanPIData" | "protected void scanPIData(String target, XMLString data)
throws IOException, XNIException {
// check target
if (target.length() == 3) {
char c0 = Character.toLowerCase(target.charAt(0));
char c1 = Character.toLowerCase(target.charAt(1));
char c2 = Ch... |
Inversion-Mutation | megadiff | "public void drawAllOverlays(boolean flare) {
userLocation = getUserLocation();
if (userLocation == null) {
printErrorAndExit("3: NULL userLocation in drawMap");
}
if (mapController == null) {
printErrorAndExit("4: NULL mapController in drawMap");
}
if (mapView == null) {
printErrorAndEx... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "drawAllOverlays" | "public void drawAllOverlays(boolean flare) {
userLocation = getUserLocation();
if (userLocation == null) {
printErrorAndExit("3: NULL userLocation in drawMap");
}
if (mapController == null) {
printErrorAndExit("4: NULL mapController in drawMap");
}
if (mapView == null) {
printErrorAndEx... |
Inversion-Mutation | megadiff | "private static void launchGui() throws SQLException, IOException {
//run Mac OS X customizations if user is on a Mac
//this code must run before *anything* else graphics-related
Image appIcon = ImageManager.getAppIcon().getImage();
MacSupport.initIfMac("EMC Shopkeeper", false, appIcon, new MacHandler() {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "launchGui" | "private static void launchGui() throws SQLException, IOException {
//run Mac OS X customizations if user is on a Mac
//this code must run before *anything* else graphics-related
Image appIcon = ImageManager.getAppIcon().getImage();
MacSupport.initIfMac("EMC Shopkeeper", false, appIcon, new MacHandler() {
... |
Inversion-Mutation | megadiff | "@Override
@SuppressWarnings("unchecked")
protected void setBundles(List<VersionedClause> bundles) {
this.bundles = bundles;
@SuppressWarnings("rawtypes")
List displayList;
if (projectBuilders.isEmpty())
displayList = bundles;
else {
dis... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setBundles" | "@Override
@SuppressWarnings("unchecked")
protected void setBundles(List<VersionedClause> bundles) {
this.bundles = bundles;
@SuppressWarnings("rawtypes")
List displayList;
if (projectBuilders.isEmpty())
displayList = bundles;
else {
dis... |
Inversion-Mutation | megadiff | "private void createNewAttribute(final String type) {
final String[] existingAttrs = CyAttributesUtils.getVisibleAttributeNames(attributes).toArray(new String[0]);
String newAttribName = null;
do {
newAttribName = JOptionPane.showInputDialog(this, "Please enter new attribute name: ",
"Create N... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createNewAttribute" | "private void createNewAttribute(final String type) {
final String[] existingAttrs = CyAttributesUtils.getVisibleAttributeNames(attributes).toArray(new String[0]);
String <MASK>newAttribName = null;</MASK>
do {
newAttribName = JOptionPane.showInputDialog(this, "Please enter new attribute name: ",
... |
Inversion-Mutation | megadiff | "@Override
public int processLineContent(String line, int offset) {
if (blockLineCount == 0) {
setOptions(matcher.group(1));
offset = matcher.start(2);
beginBlock();
}
int end = line.length();
int segmentEnd = end;
boolean terminating = false;
if (offset < end) {
Matcher end... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processLineContent" | "@Override
public int processLineContent(String line, int offset) {
if (blockLineCount == 0) {
setOptions(matcher.group(1));
offset = matcher.start(2);
beginBlock();
}
int end = line.length();
int segmentEnd = end;
boolean terminating = false;
<MASK>Matcher endMatcher = endPatter... |
Inversion-Mutation | megadiff | "@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (progress == 0 && fromUser)
progress = 1;
mNwkInfo.setTimes(progress, 0);
updateFdText();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onProgressChanged" | "@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (progress == 0 && fromUser)
progress = 1;
<MASK>updateFdText();</MASK>
mNwkInfo.setTimes(progress, 0);
}" |
Inversion-Mutation | megadiff | "@Override
protected void finalize() throws Throwable {
mOpenHelper.close();
mDatabase.close();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "finalize" | "@Override
protected void finalize() throws Throwable {
<MASK>mDatabase.close();</MASK>
mOpenHelper.close();
}" |
Inversion-Mutation | megadiff | "public void onLogout(LoginEvent.Logout event) {
finishActivityIfPermissionDenied();
setUserid();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onLogout" | "public void onLogout(LoginEvent.Logout event) {
<MASK>setUserid();</MASK>
finishActivityIfPermissionDenied();
}" |
Inversion-Mutation | megadiff | "public boolean addValue(String key, double value) {
GenericDataElement logElement = this.get(key);
if(key.equals(firstKey)){
lineCountElement.add((double)lineCount);
lineCount++;
}
return logElement.add(value);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addValue" | "public boolean addValue(String key, double value) {
GenericDataElement logElement = this.get(key);
if(key.equals(firstKey)){
<MASK>lineCount++;</MASK>
lineCountElement.add((double)lineCount);
}
return logElement.add(value);
}" |
Inversion-Mutation | megadiff | "public void setValues() {
Settings settings = Settings.getInstance();
setTitle(getString(R.string.preferencesType).replaceAll("%s", settings.getSettingsName(this)));
SharedPreferences preferences = settings.getSharedPreferences(this);
automaticUpdate.setChecked(preferences.getBoolean(Settings.AUTOMATIC_UP... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setValues" | "public void setValues() {
Settings settings = Settings.getInstance();
setTitle(getString(R.string.preferencesType).replaceAll("%s", settings.getSettingsName(this)));
SharedPreferences preferences = settings.getSharedPreferences(this);
<MASK>updateInterval.setEnabled(automaticUpdate.isChecked());</MASK>
... |
Inversion-Mutation | megadiff | "@Override
protected void onNodeDestroy(Node node) {
if (dashboard != null) {
dashboard.stop();
runOnUiThread(new Runnable() {
@Override
public void run() {
LinearLayout top = (LinearLayout)findViewById(R.id.top_bar);
top.removeView((View)dashboard... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onNodeDestroy" | "@Override
protected void onNodeDestroy(Node node) {
if (dashboard != null) {
runOnUiThread(new Runnable() {
@Override
public void run() {
LinearLayout top = (LinearLayout)findViewById(R.id.top_bar);
top.removeView((View)dashboard);
}});
... |
Inversion-Mutation | megadiff | "@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(TAG, "onCreate");
diff = getIntent().getIntExtra(KEY_DIFFICULTY, DIFFICULTY_EASY);
business = getIntent().getStringExtra(KEY_BUSINESS);
// this next part will wait indefinitely for the data fro... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(TAG, "onCreate");
diff = getIntent().getIntExtra(KEY_DIFFICULTY, DIFFICULTY_EASY);
business = getIntent().getStringExtra(KEY_BUSINESS);
// this next part will wait indefinitely for the data fro... |
Inversion-Mutation | megadiff | "public Bitmap getBitmapWithFilterApplied(final Bitmap bitmap) {
if (mGlSurfaceView != null) {
mRenderer.deleteImage();
mRenderer.runOnDraw(new Runnable() {
@Override
public void run() {
synchronized(mFilter) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getBitmapWithFilterApplied" | "public Bitmap getBitmapWithFilterApplied(final Bitmap bitmap) {
if (mGlSurfaceView != null) {
mRenderer.deleteImage();
mRenderer.runOnDraw(new Runnable() {
@Override
public void run() {
synchronized(mFilter) {
... |
Inversion-Mutation | megadiff | "public void doDeleteUser(FormEvent evt)
throws PortletException {
PortletRequest req = evt.getPortletRequest();
HiddenFieldBean hf = evt.getHiddenFieldBean("userID");
String userId = hf.getValue();
User user = this.userManagerService.getUser(userId);
if (user... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doDeleteUser" | "public void doDeleteUser(FormEvent evt)
throws PortletException {
PortletRequest req = evt.getPortletRequest();
HiddenFieldBean hf = evt.getHiddenFieldBean("userID");
String userId = hf.getValue();
User user = this.userManagerService.getUser(userId);
if (user... |
Inversion-Mutation | megadiff | "public PData(String userName, String nickName, ArrayList<IPLogin> logIns, ArrayList<Long> logOuts, long timePlayed, Data[] data) {
this.username = userName;
this.displayname = nickName;
if (this.displayname == null || this.displayname.length() == 0) {
this.displayname = this.use... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PData" | "public PData(String userName, String nickName, ArrayList<IPLogin> logIns, ArrayList<Long> logOuts, long timePlayed, Data[] data) {
this.username = userName;
this.displayname = nickName;
if (this.displayname == null || this.displayname.length() == 0) {
this.displayname = this.use... |
Inversion-Mutation | megadiff | "protected void pingTimerTask(final Timer timer) {
if (!pingTimer.equals(timer)) { return; }
if (pingNeeded) {
if (!callPingFailed()) {
pingTimer.cancel();
disconnect("Server not responding.");
}
} else {
--pingCountDown;
if (pingCountDown < 1) {
pingTime = System.currentTimeMil... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "pingTimerTask" | "protected void pingTimerTask(final Timer timer) {
if (!pingTimer.equals(timer)) { return; }
if (pingNeeded) {
if (!callPingFailed()) {
pingTimer.cancel();
disconnect("Server not responding.");
}
} else {
--pingCountDown;
if (pingCountDown < 1) {
<MASK>sendLine("PING "+System.cur... |
Inversion-Mutation | megadiff | "public boolean waitForPending() {
for (int i = 0; i < Timing.REPEAT;i++) {
if (!isPending()) {
return true;
}
refresh();
tasks.waitFor(Timing.TIME_10S);
}
return false;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "waitForPending" | "public boolean waitForPending() {
for (int i = 0; i < Timing.REPEAT;i++) {
if (!isPending()) {
return true;
}
<MASK>tasks.waitFor(Timing.TIME_10S);</MASK>
refresh();
}
return false;
}" |
Inversion-Mutation | megadiff | "private void setUpUIComponents() {
Resources r = getResources();
// set up tab host
TabHost tabHost = getTabHost();
tabHost.setPadding(0, 4, 0, 0);
LayoutInflater.from(this).inflate(R.layout.task_edit_activity,
tabHost.getTabContentView(), true);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setUpUIComponents" | "private void setUpUIComponents() {
Resources r = getResources();
// set up tab host
TabHost tabHost = getTabHost();
tabHost.setPadding(0, 4, 0, 0);
LayoutInflater.from(this).inflate(R.layout.task_edit_activity,
tabHost.getTabContentView(), true);
... |
Inversion-Mutation | megadiff | "@SuppressLint("NewApi")
public static void Recreate(Activity activity) {
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB )
activity.recreate();
else{
activity.finish();
activity.startActivity(activity.getIntent());
}
CheckScreenRotation(activity);
CheckKeepAwake(activity);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Recreate" | "@SuppressLint("NewApi")
public static void Recreate(Activity activity) {
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB )
activity.recreate();
else{
<MASK>activity.startActivity(activity.getIntent());</MASK>
activity.finish();
}
CheckScreenRotation(activity);
CheckKeepAwake(act... |
Inversion-Mutation | megadiff | "public void addRecipe(Player player, RecipeTemplate recipeTemplate)
{
int recipeId = recipeTemplate.getId();
if (!player.getRecipeList().isRecipePresent(recipeId))
{
recipeList.add(recipeId);
DAOManager.getDAO(PlayerRecipesDAO.class).addRecipe(player.getObjectId(), recipeId);
PacketSendUtility.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addRecipe" | "public void addRecipe(Player player, RecipeTemplate recipeTemplate)
{
int recipeId = recipeTemplate.getId();
<MASK>recipeList.add(recipeId);</MASK>
if (!player.getRecipeList().isRecipePresent(recipeId))
{
DAOManager.getDAO(PlayerRecipesDAO.class).addRecipe(player.getObjectId(), recipeId);
Packet... |
Inversion-Mutation | megadiff | "private static RuleBase createRuleBase() throws DroolsParserException {
System.out.println("Generating "+RULE_COUNT+" rules");
StringBuilder sb = new StringBuilder(LargeRuleBase.getHeader());
for (int i = 0; i < RULE_COUNT; i++) {
sb.append(LargeRuleBase.getTemplate1("testR... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createRuleBase" | "private static RuleBase createRuleBase() throws DroolsParserException {
System.out.println("Generating "+RULE_COUNT+" rules");
StringBuilder sb = new StringBuilder(LargeRuleBase.getHeader());
for (int i = 0; i < RULE_COUNT; i++) {
sb.append(LargeRuleBase.getTemplate1("testR... |
Inversion-Mutation | megadiff | "@NotNull
protected GlobalTemplateContext buildGlobalContext(
@NotNull final List<TemplateDef<String>> templateDefs,
@NotNull final QueryJCommand parameters)
{
@NotNull final String templateName = retrieveTemplateName(parameters);
@NotNull final String outputPackage = retri... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildGlobalContext" | "@NotNull
protected GlobalTemplateContext buildGlobalContext(
@NotNull final List<TemplateDef<String>> templateDefs,
@NotNull final QueryJCommand parameters)
{
@NotNull final String templateName = retrieveTemplateName(parameters);
@NotNull final String outputPackage = retri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.