type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "protected boolean reconfigureByURL(URL srcURL) {
if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("watchdog \"{}\" reconfiguring from url: {}",
this.getName(), srcURL);
}
// create an instance of the configurator class
Configurator configurator = getConfiguratorInst... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "reconfigureByURL" | "protected boolean reconfigureByURL(URL srcURL) {
if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("watchdog \"{}\" reconfiguring from url: {}",
this.getName(), srcURL);
}
// create an instance of the configurator class
Configurator configurator = getConfiguratorInst... |
Inversion-Mutation | megadiff | "protected void setupEnvironment(PythonInterpreter interp,
Properties props,
PySystemState systemState) throws PyException {
processPythonLib(interp, systemState);
checkSitePackages(props);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setupEnvironment" | "protected void setupEnvironment(PythonInterpreter interp,
Properties props,
PySystemState systemState) throws PyException {
<MASK>checkSitePackages(props);</MASK>
processPythonLib(interp, systemState);
}" |
Inversion-Mutation | megadiff | "private void load() {
synchronized(CodeEntry.class) {
if(lpe != null)
return;
ClassLoader loader = loader(false);
lpe = new TreeMap<String, Class<?>>();
try {
for(Map.Entry<String, String> e : pe.entrySet()) {
String name = e.getKey();
String clnm = e.getValue();
Class<?> c... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "load" | "private void load() {
synchronized(CodeEntry.class) {
if(lpe != null)
return;
<MASK>lpe = new TreeMap<String, Class<?>>();</MASK>
ClassLoader loader = loader(false);
try {
for(Map.Entry<String, String> e : pe.entrySet()) {
String name = e.getKey();
String clnm = e.getValue();
... |
Inversion-Mutation | megadiff | "public T poll() {
checkEmpty();
T value = a[0];
swap(a, 0, size - 1);
size--;
heapify(0);
return value;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "poll" | "public T poll() {
checkEmpty();
T value = a[0];
swap(a, 0, size - 1);
<MASK>heapify(0);</MASK>
size--;
return value;
}" |
Inversion-Mutation | megadiff | "public Collection<OsmPrimitive> uploadDiff(Collection<OsmPrimitive> list) throws OsmTransferException {
if (changeset == null) {
throw new OsmTransferException(tr("No changeset present for diff upload"));
}
CreateOsmChangeVisitor duv = new CreateOsmChangeVisitor(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "uploadDiff" | "public Collection<OsmPrimitive> uploadDiff(Collection<OsmPrimitive> list) throws OsmTransferException {
if (changeset == null) {
throw new OsmTransferException(tr("No changeset present for diff upload"));
}
CreateOsmChangeVisitor duv = new CreateOsmChangeVisitor(... |
Inversion-Mutation | megadiff | "public void runTextCompressionTest(CompressionCodec codec, int expectedNum)
throws IOException {
String [] columns = HsqldbTestServer.getFieldNames();
String [] argv = getArgv(true, columns, codec, "--as-textfile");
runImport(argv);
Configuration conf = new Configuration();
if (!BaseS... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runTextCompressionTest" | "public void runTextCompressionTest(CompressionCodec codec, int expectedNum)
throws IOException {
String [] columns = HsqldbTestServer.getFieldNames();
String [] argv = getArgv(true, columns, codec, "--as-textfile");
runImport(argv);
Configuration conf = new Configuration();
if (!BaseS... |
Inversion-Mutation | megadiff | "@Override
protected final void initSpring(final ApplicationContext applicationContext,
final ITestContext testContext, final ITestMessages testMessages,
final HttpServletRequest request, final HttpServletResponse response,
final ServletContext servletContext, final Locale lo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initSpring" | "@Override
protected final void initSpring(final ApplicationContext applicationContext,
final ITestContext testContext, final ITestMessages testMessages,
final HttpServletRequest request, final HttpServletResponse response,
final ServletContext servletContext, final Locale lo... |
Inversion-Mutation | megadiff | "public void openTray(DialogTray tray) throws IllegalStateException, UnsupportedOperationException {
if (tray == null) {
throw new NullPointerException("Tray was null"); //$NON-NLS-1$
}
if (getTray() != null) {
throw new IllegalStateException("Tray was already open"); //$NON-NLS-1$
}
if (!isCompa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "openTray" | "public void openTray(DialogTray tray) throws IllegalStateException, UnsupportedOperationException {
if (tray == null) {
throw new NullPointerException("Tray was null"); //$NON-NLS-1$
}
if (getTray() != null) {
throw new IllegalStateException("Tray was already open"); //$NON-NLS-1$
}
if (!isCompa... |
Inversion-Mutation | megadiff | "@Override
protected void
processUnsolicited (Parcel p) {
Object ret;
int dataPosition = p.dataPosition(); // save off position within the Parcel
int response = p.readInt();
switch(response) {
case RIL_UNSOL_RIL_CONNECTED: // Fix for NV/RUIM setting on CDMA S... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processUnsolicited" | "@Override
protected void
processUnsolicited (Parcel p) {
Object ret;
int dataPosition = p.dataPosition(); // save off position within the Parcel
int response = p.readInt();
switch(response) {
case RIL_UNSOL_RIL_CONNECTED: // Fix for NV/RUIM setting on CDMA S... |
Inversion-Mutation | megadiff | "private void resetInternal() {
if (colorMap!=null) colorMap.clear();
if (xyGraph!=null) {
try {
for (Axis axis : xyGraph.getAxisList()) axis.setRange(0,100);
clearTraces();
} catch (Throwable e) {
logger.error("Cannot remove plots!", e);
}
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resetInternal" | "private void resetInternal() {
if (colorMap!=null) colorMap.clear();
if (xyGraph!=null) {
try {
<MASK>clearTraces();</MASK>
for (Axis axis : xyGraph.getAxisList()) axis.setRange(0,100);
} catch (Throwable e) {
logger.error("Cannot remove plots!", e);
}
}
}" |
Inversion-Mutation | megadiff | "public void executeQuery(String query, Map<String, String> params) {
int index = query.indexOf("${");
while(index != -1) {
int endIndex = query.indexOf('}', index);
String param = query.substring(index + 2, endIndex);
index = query.indexOf("${", endIndex);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeQuery" | "public void executeQuery(String query, Map<String, String> params) {
int index = query.indexOf("${");
while(index != -1) {
int endIndex = query.indexOf('}', index);
String param = query.substring(index + 2, endIndex);
String replacement = params.get(param);
... |
Inversion-Mutation | megadiff | "public void updateTestOutline() {
if (viewer == null) return;
if (viewer.getContentProvider() == null) return;
Control control = viewer.getControl();
if (control == null || control.isDisposed()) return;
Display display = control.getDisplay();
if (display == nul... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateTestOutline" | "public void updateTestOutline() {
if (viewer == null) return;
if (viewer.getContentProvider() == null) return;
Control control = viewer.getControl();
if (control == null || control.isDisposed()) return;
Display display = control.getDisplay();
if (display == nul... |
Inversion-Mutation | megadiff | "public void run() {
if (viewer.getControl().isDisposed()) return;
viewer.setInput(null);
ActiveEditor activeEditor = MakeGoodContext.getInstance().getActiveEditor();
if (!activeEditor.isPHP()) return;
ISourceModule module = Edit... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
if (viewer.getControl().isDisposed()) return;
viewer.setInput(null);
ActiveEditor activeEditor = MakeGoodContext.getInstance().getActiveEditor();
if (!activeEditor.isPHP()) return;
ISourceModule module = Edit... |
Inversion-Mutation | megadiff | "@Override
public void createControlPanel(FBReader activity, RelativeLayout root) {
if (myWindow != null && activity == myWindow.getActivity()) {
return;
}
myWindow = new PopupWindow(activity, root, PopupWindow.Location.Bottom, true);
final View layout = activity.getLayoutInflater().inflate(R.layo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createControlPanel" | "@Override
public void createControlPanel(FBReader activity, RelativeLayout root) {
if (myWindow != null && activity == myWindow.getActivity()) {
return;
}
myWindow = new PopupWindow(activity, root, PopupWindow.Location.Bottom, true);
final View layout = activity.getLayoutInflater().inflate(R.layo... |
Inversion-Mutation | megadiff | "public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (fromUser) {
final int page = progress + 1;
final int pagesNumber = seekBar.getMax() + 1;
gotoPage(page);
text.setText(makeProgressText(page, pagesNumber));
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onProgressChanged" | "public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (fromUser) {
final int page = progress + 1;
final int pagesNumber = seekBar.getMax() + 1;
<MASK>text.setText(makeProgressText(page, pagesNumber));</MASK>
gotoPage(page);
}
}" |
Inversion-Mutation | megadiff | "public Gameplay(int player, Controller control) {
this.control = control;
new Sound(System.getProperty("user.dir") +"/graphics/musik.wav").loop();
// Saves the amount of players
// this.playerCount = player;
this.playerCount = player;
// Initialize a Draw Object
this.screen = new Draw(control);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Gameplay" | "public Gameplay(int player, Controller control) {
this.control = control;
// Saves the amount of players
// this.playerCount = player;
this.playerCount = player;
// Initialize a Draw Object
this.screen = new Draw(control);
<MASK>new Sound(System.getProperty("user.dir") +"/graphics/musik.wav").l... |
Inversion-Mutation | megadiff | "@EventHandler
public void projectileHit(ProjectileHitEvent event) {
Player player = null;
dNPC npc = null;
dEntity projectile = new dEntity(event.getEntity());
Block block = null;
BlockIterator bi = new BlockIterator(projectile.getLocation().getWorld(), projectil... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "projectileHit" | "@EventHandler
public void projectileHit(ProjectileHitEvent event) {
Player player = null;
dNPC npc = null;
dEntity projectile = new dEntity(event.getEntity());
Block block = null;
BlockIterator bi = new BlockIterator(projectile.getLocation().getWorld(), projectil... |
Inversion-Mutation | megadiff | "public void gotoRoom(Room nextRoom)
{
//gotoRoomMovingChar();
currentRoom = nextRoom;
aPlayer.setCurrentPlayerRoom(nextRoom);
nbDeplacementRestant -= 1;
setChanged();
notifyObservers();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "gotoRoom" | "public void gotoRoom(Room nextRoom)
{
//gotoRoomMovingChar();
currentRoom = nextRoom;
aPlayer.setCurrentPlayerRoom(nextRoom);
setChanged();
notifyObservers();
<MASK>nbDeplacementRestant -= 1;</MASK>
}" |
Inversion-Mutation | megadiff | "@Override
protected void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );
m_cp = CommonPrefs.get();
m_jniu = JNIUtilsImpl.get();
setContentView( R.layout.board );
m_handler = new Handler();
m_timers = new TimerRunnable[4]... | 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 );
m_cp = CommonPrefs.get();
m_jniu = JNIUtilsImpl.get();
setContentView( R.layout.board );
m_handler = new Handler();
m_timers = new TimerRunnable[4]... |
Inversion-Mutation | megadiff | "@Override
public void delete() {
getUnitItems().clear();
getRequestItems().clear();
getProjectFinancers().clear();
getFinancers().clear();
super.delete();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "delete" | "@Override
public void delete() {
<MASK>super.delete();</MASK>
getUnitItems().clear();
getRequestItems().clear();
getProjectFinancers().clear();
getFinancers().clear();
}" |
Inversion-Mutation | megadiff | "public List<MinecraftJar> getJars() {
File base = new File(getMinecraftDir(), "bin");
List<MinecraftJar> jars = new ArrayList<MinecraftJar>();
jars.add(new MinecraftJar(new File(base, "minecraft.jar")));
File[] files = base.listFiles();
if (files == null) {
re... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getJars" | "public List<MinecraftJar> getJars() {
File base = new File(getMinecraftDir(), "bin");
List<MinecraftJar> jars = new ArrayList<MinecraftJar>();
jars.add(new MinecraftJar(new File(base, "minecraft.jar")));
File[] files = base.listFiles();
<MASK>Arrays.sort(files);</MASK>
... |
Inversion-Mutation | megadiff | "@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = convertView;
BookmarkModelHolder holder = new BookmarkModelHolder();
final BookmarkModel bookmark = data.get(position);
PageModel pageModel = null;
try {
pageModel = bookmark.getPageModel();
} catch (... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getView" | "@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = convertView;
BookmarkModelHolder holder = new BookmarkModelHolder();
final BookmarkModel bookmark = data.get(position);
PageModel pageModel = null;
try {
pageModel = bookmark.getPageModel();
} catch (... |
Inversion-Mutation | megadiff | "public boolean readRichSequence(BufferedReader reader,
SymbolTokenization symParser,
RichSeqIOListener rlistener,
Namespace ns)
throws IllegalSymbolException, IOException, ParseException {
boolean hasAnotherSequence = true;
//boolean hasIn... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readRichSequence" | "public boolean readRichSequence(BufferedReader reader,
SymbolTokenization symParser,
RichSeqIOListener rlistener,
Namespace ns)
throws IllegalSymbolException, IOException, ParseException {
boolean hasAnotherSequence = true;
//boolean hasIn... |
Inversion-Mutation | megadiff | "public Resource<?> lock(ResourceURI uri, User user)
throws IllegalStateException, ContentRepositoryException, IOException {
Future<Resource<?>> futureResource = lock(uri, user, null);
try {
return futureResource.get();
} catch (Exception e) {
if (e.getCause() instanceof ContentRepo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "lock" | "public Resource<?> lock(ResourceURI uri, User user)
throws IllegalStateException, ContentRepositoryException, IOException {
try {
<MASK>Future<Resource<?>> futureResource = lock(uri, user, null);</MASK>
return futureResource.get();
} catch (Exception e) {
if (e.getCause() instanc... |
Inversion-Mutation | megadiff | "public void showParametersDialog(Component parentComp, String[] takenNames, MapType map, boolean editable) {
this.takenNames = takenNames;
this.parentMap = map;
paramsPanel = getParametersPanel(editable,map);
if (parentComp == null || SwingUtilities.get... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showParametersDialog" | "public void showParametersDialog(Component parentComp, String[] takenNames, MapType map, boolean editable) {
this.takenNames = takenNames;
this.parentMap = map;
paramsPanel = getParametersPanel(editable,map);
if (parentComp == null || SwingUtilities.get... |
Inversion-Mutation | megadiff | "public void testNonStandardFilePatternWithJobParameters() throws Exception {
resource.setFilePattern("foo/data/%JOB_NAME%/%job.key%-foo");
jobInstance = new JobInstance(new Long(0), new JobParametersBuilder().addString("job.key", "spam")
.toJobParameters(), new JobSupport("testJob"));
JobExecution jobExe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testNonStandardFilePatternWithJobParameters" | "public void testNonStandardFilePatternWithJobParameters() throws Exception {
jobInstance = new JobInstance(new Long(0), new JobParametersBuilder().addString("job.key", "spam")
.toJobParameters(), new JobSupport("testJob"));
JobExecution jobExecution = jobInstance.createJobExecution();
Step step = new St... |
Inversion-Mutation | megadiff | "public Main() {
Main.MAIN = this;
BLUEPRINT_REGISTRY = BlueprintRegistry.load("Content/Bases/Bases.xml");
BUILDING_REGISTRY = new BuildingRegistry();
BUILDING_REGISTRY.load();
paused = true;
Main.GAME_LOOP = new GameLoop(20);
VECTOR2D_SOURCE = new Cached... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Main" | "public Main() {
Main.MAIN = this;
BLUEPRINT_REGISTRY = BlueprintRegistry.load("Content/Bases/Bases.xml");
BUILDING_REGISTRY = new BuildingRegistry();
BUILDING_REGISTRY.load();
paused = true;
Main.GAME_LOOP = new GameLoop(20);
VECTOR2D_SOURCE = new Cached... |
Inversion-Mutation | megadiff | "@Override
protected Boolean doInBackgroundInternal(Geocache[] caches) {
final StringBuilder fieldNoteBuffer = new StringBuilder();
try {
int i = 0;
for (Geocache cache : caches) {
if (cache.isLogOffline()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInBackgroundInternal" | "@Override
protected Boolean doInBackgroundInternal(Geocache[] caches) {
final StringBuilder fieldNoteBuffer = new StringBuilder();
try {
int i = 0;
for (Geocache cache : caches) {
if (cache.isLogOffline()) {
... |
Inversion-Mutation | megadiff | "private void handleCollectedData(EcoreModelResourceVisitor visitor) {
for (IFile f : visitor.getRemovedModelFiles()) {
String workspacePath = getKeyPath(f);
Descriptor d = pathToDescriptor.remove(workspacePath);
if (d != null) {
Descriptor d2 = uriToDescriptor.remove(d.nsURI);
assert d2 == d;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleCollectedData" | "private void handleCollectedData(EcoreModelResourceVisitor visitor) {
for (IFile f : visitor.getRemovedModelFiles()) {
String workspacePath = getKeyPath(f);
Descriptor d = pathToDescriptor.remove(workspacePath);
if (d != null) {
Descriptor d2 = uriToDescriptor.remove(d.nsURI);
assert d2 == d;
... |
Inversion-Mutation | megadiff | "public void startCountdown() throws IOException
{
if(timer != null)
return; // can't re-start a running countdown.
if(listener != null)
listener.started();
startTime = endTime = 0;
// read events file for general settings
Properties conf = new Properties();
try
{
conf.load(new... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startCountdown" | "public void startCountdown() throws IOException
{
if(timer != null)
return; // can't re-start a running countdown.
if(listener != null)
listener.started();
<MASK>setTimer(/*aborting*/ false);</MASK>
startTime = endTime = 0;
// read events file for general settings
Properties conf = ne... |
Inversion-Mutation | megadiff | "private SeekBar createSlider(View view, int id, int value, String resourceKey) {
final SeekBar slider = (SeekBar)view.findViewById(id);
slider.setProgressDrawable(new SeekBarDrawable(
slider.getProgressDrawable(),
ZLResource.resource("color").getResource(resourceKey).getValue(),
slider
));
sli... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createSlider" | "private SeekBar createSlider(View view, int id, int value, String resourceKey) {
final SeekBar slider = (SeekBar)view.findViewById(id);
<MASK>slider.setProgress(value);</MASK>
slider.setProgressDrawable(new SeekBarDrawable(
slider.getProgressDrawable(),
ZLResource.resource("color").getResource(resourc... |
Inversion-Mutation | megadiff | "public FiltersTableModel(final Filters config) {
filters = new ArrayList<Filter>();
// add only exist filters
for (Filter f : config.getFilter()) {
IFilter fi = FilterMaster.getInstance().getFilterInstance(f.getClassName());
if (fi != null) {
// fi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "FiltersTableModel" | "public FiltersTableModel(final Filters config) {
filters = new ArrayList<Filter>();
// add only exist filters
for (Filter f : config.getFilter()) {
IFilter fi = FilterMaster.getInstance().getFilterInstance(f.getClassName());
<MASK>filterNames.put(f.getClassName(), f... |
Inversion-Mutation | megadiff | "public static ProjectData getGlobalProjectData()
{
if (globalProjectData != null)
return globalProjectData;
globalProjectData = new ProjectData();
initialize();
return globalProjectData;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getGlobalProjectData" | "public static ProjectData getGlobalProjectData()
{
if (globalProjectData != null)
return globalProjectData;
<MASK>initialize();</MASK>
globalProjectData = new ProjectData();
return globalProjectData;
}" |
Inversion-Mutation | megadiff | "@Override
public void remove() {
if (!mEntryValid) {
throw new IllegalStateException();
}
colRemoveAt(mIndex);
mIndex--;
mEnd--;
mEntryValid = false;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "remove" | "@Override
public void remove() {
if (!mEntryValid) {
throw new IllegalStateException();
}
mIndex--;
mEnd--;
mEntryValid = false;
<MASK>colRemoveAt(mIndex);</MASK>
}" |
Inversion-Mutation | megadiff | "KademliaPeer addOrUpdate(KademliaPeer peer) {
synchronized(peers) {
int index = Collections.binarySearch(peers, peer, distanceComparator);
if (index >= 0) { // destination is already in the bucket, so update it
peers.get(index).responseReceived();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addOrUpdate" | "KademliaPeer addOrUpdate(KademliaPeer peer) {
synchronized(peers) {
int index = Collections.binarySearch(peers, peer, distanceComparator);
if (index >= 0) { // destination is already in the bucket, so update it
peers.get(index).responseReceived();
... |
Inversion-Mutation | megadiff | "public void login(final String email, final String password) throws IOException, SerializationException {
// We get called immediately here, which might be before we've started... wait, if so
if (!started) {
startupLock.lock();
try {
try {
log.debug("Waiting to login until user service is star... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "login" | "public void login(final String email, final String password) throws IOException, SerializationException {
// We get called immediately here, which might be before we've started... wait, if so
if (!started) {
startupLock.lock();
try {
try {
log.debug("Waiting to login until user service is star... |
Inversion-Mutation | megadiff | "public void doRun() throws Exception {
synchronized (UserService.this) {
usersByEmail.put(me.getEmail(), me);
usersById.put(me.getUserId(), me);
}
rbnb.getEventService().fireLoggedIn();
rbnb.getEventService().fireUserChanged(me);
rbnb.getTaskService().runTask(new InitialFet... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doRun" | "public void doRun() throws Exception {
<MASK>rbnb.getEventService().fireLoggedIn();</MASK>
synchronized (UserService.this) {
usersByEmail.put(me.getEmail(), me);
usersById.put(me.getUserId(), me);
}
rbnb.getEventService().fireUserChanged(me);
rbnb.getTaskService().runTask(n... |
Inversion-Mutation | megadiff | "@Override
public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
throws AlgebricksException {
AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
if (context.checkIfInDontApplySet(this, op)) {
return false;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "rewritePost" | "@Override
public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
throws AlgebricksException {
AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
if (context.checkIfInDontApplySet(this, op)) {
return false;
... |
Inversion-Mutation | megadiff | "public NettyConnectionsPool(int maxTotalConnections, int maxConnectionPerHost, long maxIdleTime, boolean sslConnectionPoolEnabled, int maxConnectionLifeTimeInMs, Timer idleConnectionDetector) {
this.maxTotalConnections = maxTotalConnections;
this.maxConnectionPerHost = maxConnectionPerHost;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "NettyConnectionsPool" | "public NettyConnectionsPool(int maxTotalConnections, int maxConnectionPerHost, long maxIdleTime, boolean sslConnectionPoolEnabled, int maxConnectionLifeTimeInMs, Timer idleConnectionDetector) {
this.maxTotalConnections = maxTotalConnections;
this.maxConnectionPerHost = maxConnectionPerHost;
... |
Inversion-Mutation | megadiff | "public boolean contains(float x, float y) {
checkPoints();
if (points.length == 0) {
return false;
}
boolean result = false;
float xnew,ynew;
float xold,yold;
float x1,y1;
float x2,y2;
int npoints = points.length;
xold=po... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "contains" | "public boolean contains(float x, float y) {
if (points.length == 0) {
return false;
}
<MASK>checkPoints();</MASK>
boolean result = false;
float xnew,ynew;
float xold,yold;
float x1,y1;
float x2,y2;
int npoints = points.length;
... |
Inversion-Mutation | megadiff | "@Override
public void doSave(IProgressMonitor monitor) {
super.doSave(monitor);
ContactService contactService = Activator.getDefault().getService(
ContactService.class);
if (contactService != null) {
updateModel();
Contact contact = getObject();
if (checkAddress(contact.getAddress())) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doSave" | "@Override
public void doSave(IProgressMonitor monitor) {
super.doSave(monitor);
ContactService contactService = Activator.getDefault().getService(
ContactService.class);
if (contactService != null) {
updateModel();
Contact contact = getObject();
if (checkAddress(contact.getAddress())) {
... |
Inversion-Mutation | megadiff | "protected void load(final RServiNodeConfig templ) {
this.rHome = templ.rHome;
this.rArch = templ.rArch;
this.bits = templ.bits;
this.javaHome = templ.javaHome;
this.javaArgs = templ.javaArgs;
this.environmentVariables.clear();
this.environmentVariables.putAll(templ.environmentVariables);
this.n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "load" | "protected void load(final RServiNodeConfig templ) {
this.rHome = templ.rHome;
this.rArch = templ.rArch;
this.bits = templ.bits;
this.javaHome = templ.javaHome;
this.javaArgs = templ.javaArgs;
this.environmentVariables.putAll(templ.environmentVariables);
this.nodeArgs = templ.nodeArgs;
this.bas... |
Inversion-Mutation | megadiff | "Mapper mapChild(Object e) {
//Mapper childMapper = new Mapper();
java.util.List childAxes = new ArrayList();
java.util.HashMap pseudoSelectors = new java.util.HashMap();
java.util.List mappedSelectors = new java.util.LinkedList();
StringBuffer key = new ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mapChild" | "Mapper mapChild(Object e) {
//Mapper childMapper = new Mapper();
java.util.List childAxes = new ArrayList();
java.util.HashMap pseudoSelectors = new java.util.HashMap();
java.util.List mappedSelectors = new java.util.LinkedList();
StringBuffer key = new ... |
Inversion-Mutation | megadiff | "public void onReceivedMessage(SipProvider provider, Message msg) {
if (msg.isResponse()) {
int code = msg.getStatusLine().getCode();
if (code >= 100 && code < 200
&& (statusIs(STATE_TRYING) || statusIs(STATE_PROCEEDING))) {
if (statusIs(STATE_TRYING)) {
retransmission_to.halt();
trans... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onReceivedMessage" | "public void onReceivedMessage(SipProvider provider, Message msg) {
if (msg.isResponse()) {
int code = msg.getStatusLine().getCode();
if (code >= 100 && code < 200
&& (statusIs(STATE_TRYING) || statusIs(STATE_PROCEEDING))) {
if (statusIs(STATE_TRYING)) {
retransmission_to.halt();
trans... |
Inversion-Mutation | megadiff | "@Override
public void exec(CommandSender sender, String commandName, String[] args, Player player, boolean isPlayer) {
if (isPlayer) {
if (args.length < 2) {
player.sendMessage(ChatColor.RED + "Correct usage: /msg player message");
return;
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "exec" | "@Override
public void exec(CommandSender sender, String commandName, String[] args, Player player, boolean isPlayer) {
if (isPlayer) {
if (args.length < 2) {
player.sendMessage(ChatColor.RED + "Correct usage: /msg player message");
return;
}
... |
Inversion-Mutation | megadiff | "public void claimCurrentChunk() {
ChunkyChunk chunkyChunk = this.getCurrentChunk();
ChunkyPlayerChunkClaimEvent event = new ChunkyPlayerChunkClaimEvent(this,chunkyChunk, ChunkyAccessLevel.UNOWNED);
event.setCancelled(false);
Chunky.getModuleManager().callEvent(event);
if(e... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "claimCurrentChunk" | "public void claimCurrentChunk() {
ChunkyChunk chunkyChunk = this.getCurrentChunk();
ChunkyPlayerChunkClaimEvent event = new ChunkyPlayerChunkClaimEvent(this,chunkyChunk, ChunkyAccessLevel.UNOWNED);
<MASK>Chunky.getModuleManager().callEvent(event);</MASK>
event.setCancelled(false);
... |
Inversion-Mutation | megadiff | "public static Channel newJVM(String displayName, TaskListener listener, FilePath workDir, ClasspathBuilder classpath, Map<String,String> systemProperties) throws IOException {
ServerSocket serverSocket = new ServerSocket();
serverSocket.bind(new InetSocketAddress("localhost",0));
serverSocke... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "newJVM" | "public static Channel newJVM(String displayName, TaskListener listener, FilePath workDir, ClasspathBuilder classpath, Map<String,String> systemProperties) throws IOException {
ServerSocket serverSocket = new ServerSocket();
serverSocket.bind(new InetSocketAddress("localhost",0));
serverSocke... |
Inversion-Mutation | megadiff | "@Override
public void run() {
logger.info("Started DS-computer for " + this.getDawidSkeneId()
+ " with " + this.iterations + " iterations.");
DawidSkene ds = this.getCache().getDawidSkeneForEditing(
this.getDawidSkeneId(), this);
if (!ds.isComputed()) {
ds.estimate(this.iterations);
}
t... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
logger.info("Started DS-computer for " + this.getDawidSkeneId()
+ " with " + this.iterations + " iterations.");
DawidSkene ds = this.getCache().getDawidSkeneForEditing(
this.getDawidSkeneId(), this);
if (!ds.isComputed()) {
ds.estimate(this.iterations);
<MASK>... |
Inversion-Mutation | megadiff | "private VariableDeclaration createVariable(Parent parent, IASTDeclSpecifier specifier, IASTDeclarator declarator, boolean isTemplate) throws CModelException {
if (declarator == null) {
return null;
}
IASTDeclarator nestedDeclarator= declarator;
while (nestedDeclarator.getNestedDeclarator() != null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createVariable" | "private VariableDeclaration createVariable(Parent parent, IASTDeclSpecifier specifier, IASTDeclarator declarator, boolean isTemplate) throws CModelException {
if (declarator == null) {
return null;
}
IASTDeclarator nestedDeclarator= declarator;
while (nestedDeclarator.getNestedDeclarator() != null) {
... |
Inversion-Mutation | megadiff | "public void actionPerformed(ActionEvent ae) {
String[] text = getText().split("-");
if (text.length > 1) {
String time = getTime();
StringBuilder sb = new StringBuilder();
for (int i = Integer.parseInt(text[0]); i < Integer
.parseInt(text[1]) + 1; i++) {
sb.append(i);
sb.append(';');
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "public void actionPerformed(ActionEvent ae) {
String[] text = getText().split("-");
if (text.length > 1) {
String time = getTime();
StringBuilder sb = new StringBuilder();
for (int i = Integer.parseInt(text[0]); i < Integer
.parseInt(text[1]) + 1; i++) {
sb.append(i);
sb.append(';');
... |
Inversion-Mutation | megadiff | "public static void main(String[] args) {
JFrame frame = new JFrame("Bouncy Balls");
frame.setSize(600, 600);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
DrawingPanel form = new DrawingPanel();
frame.add(form);
frame.setVisible(true);
}" | 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) {
<MASK>DrawingPanel form = new DrawingPanel();</MASK>
JFrame frame = new JFrame("Bouncy Balls");
frame.setSize(600, 600);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(form);
frame.setVisible(true);
}" |
Inversion-Mutation | megadiff | "public void testBlockPackedReaderWriter() throws IOException {
final int iters = atLeast(2);
for (int iter = 0; iter < iters; ++iter) {
final int blockSize = 1 << _TestUtil.nextInt(random(), 6, 18);
final int valueCount = random().nextInt(1 << 18);
final long[] values = new long[valueCou... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testBlockPackedReaderWriter" | "public void testBlockPackedReaderWriter() throws IOException {
final int iters = atLeast(2);
for (int iter = 0; iter < iters; ++iter) {
final int blockSize = 1 << _TestUtil.nextInt(random(), 6, 18);
final int valueCount = random().nextInt(1 << 18);
final long[] values = new long[valueCou... |
Inversion-Mutation | megadiff | "@Test
public void testServices() throws InterruptedException {
//Install all services
executeCommand("features:install whirr-cassandra");
executeCommand("features:install whirr-chef");
executeCommand("features:install whirr-elasticsearch");
executeCommand("features:install whirr-ganglia");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testServices" | "@Test
public void testServices() throws InterruptedException {
//Install all services
executeCommand("features:install whirr-cassandra");
executeCommand("features:install whirr-chef");
executeCommand("features:install whirr-elasticsearch");
executeCommand("features:install whirr-ganglia");
... |
Inversion-Mutation | megadiff | "public void walk(FacesContext facesContext, DataVisitor dataVisitor, Range range, Object o)
{
int firstRow = ((SequenceRange) range).getFirstRow();
int numberOfRows = ((SequenceRange) range).getRows();
if (dataProvider.getFirstResult() == null || dataProvider.getFirstResult() != firstRo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "walk" | "public void walk(FacesContext facesContext, DataVisitor dataVisitor, Range range, Object o)
{
int firstRow = ((SequenceRange) range).getFirstRow();
int numberOfRows = ((SequenceRange) range).getRows();
if (dataProvider.getFirstResult() == null || dataProvider.getFirstResult() != firstRo... |
Inversion-Mutation | megadiff | "protected void removeScoping(KernelControllerContext context) throws Throwable
{
KernelController controller = (KernelController)context.getController();
KernelMetaDataRepository repository = controller.getKernel().getMetaDataRepository();
ScopeKey scopeKey = context.getInstallScope();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeScoping" | "protected void removeScoping(KernelControllerContext context) throws Throwable
{
KernelController controller = (KernelController)context.getController();
KernelMetaDataRepository repository = controller.getKernel().getMetaDataRepository();
ScopeKey scopeKey = context.getInstallScope();
... |
Inversion-Mutation | megadiff | "public CategoryDataset createDataset(TimeScale timeScale) {
return createDataset(timeScale,
new float[][]{
totalExecutors.pick(timeScale).getHistory(),
busyExecutors.pick(timeScale).getHistory(),
queueLength.pick(timeScale).getHi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createDataset" | "public CategoryDataset createDataset(TimeScale timeScale) {
return createDataset(timeScale,
new float[][]{
<MASK>busyExecutors.pick(timeScale).getHistory(),</MASK>
totalExecutors.pick(timeScale).getHistory(),
queueLength.pick(tim... |
Inversion-Mutation | megadiff | "public DataExportPopupMenu() {
if (validateUserHasNasAccess()) {
this.add(createNASMenuItem());
}
if (validateUserHasButler1Access()) {
this.add(createButler2MenuItem());
this.add(createButler1MenuItem());
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DataExportPopupMenu" | "public DataExportPopupMenu() {
if (validateUserHasNasAccess()) {
this.add(createNASMenuItem());
}
if (validateUserHasButler1Access()) {
<MASK>this.add(createButler1MenuItem());</MASK>
this.add(createButler2MenuItem());
... |
Inversion-Mutation | megadiff | "private void storeIcon(Bitmap icon) {
// Do this first in case the download failed.
if (mTab != null) {
// Remove the touch icon loader from the BrowserActivity.
mTab.mTouchIconLoader = null;
}
if (icon == null || mCursor == null || isCancelled()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "storeIcon" | "private void storeIcon(Bitmap icon) {
// Do this first in case the download failed.
if (mTab != null) {
// Remove the touch icon loader from the BrowserActivity.
mTab.mTouchIconLoader = null;
}
if (icon == null || mCursor == null || isCancelled()) {
... |
Inversion-Mutation | megadiff | "public synchronized void setEncoding( boolean bigend ) {
isBigendian_ = bigend;
for ( Bank bank : getExistingBanks() ) {
bank.updateBankEncoding();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setEncoding" | "public synchronized void setEncoding( boolean bigend ) {
for ( Bank bank : getExistingBanks() ) {
bank.updateBankEncoding();
}
<MASK>isBigendian_ = bigend;</MASK>
}" |
Inversion-Mutation | megadiff | "public void setRelativeStagePosition(double z) throws MMScriptException {
try {
core_.setRelativePosition(core_.getFocusDevice(), z);
cb_.onStagePositionChangedRelative(core_.getFocusDevice(), z);
core_.waitForDevice(core_.getFocusDevice());
} catch (Exception e) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setRelativeStagePosition" | "public void setRelativeStagePosition(double z) throws MMScriptException {
try {
<MASK>cb_.onStagePositionChangedRelative(core_.getFocusDevice(), z);</MASK>
core_.setRelativePosition(core_.getFocusDevice(), z);
core_.waitForDevice(core_.getFocusDevice());
} catch (Exception ... |
Inversion-Mutation | megadiff | "private void hideSubtree(Node root)
{
boolean changed = false;
boolean currentChanged = false;
int depth = NodeUtils.getDepth(root);
Node node = root;
while (node != null)
{
if (node == m_currentNode)
{
m_currentNode ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hideSubtree" | "private void hideSubtree(Node root)
{
boolean changed = false;
boolean currentChanged = false;
int depth = NodeUtils.getDepth(root);
Node node = root;
while (node != null)
{
if (node == m_currentNode)
{
m_currentNode ... |
Inversion-Mutation | megadiff | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createProject" | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... |
Inversion-Mutation | megadiff | "private void draw() {
// GUIFrame = new JFrame(language.getText("ojim"));
try {
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Windows".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
break;
} else if ("Nimbus".equals(info.getName()... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "draw" | "private void draw() {
// GUIFrame = new JFrame(language.getText("ojim"));
try {
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Windows".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
break;
} else if ("Nimbus".equals(info.getName()... |
Inversion-Mutation | megadiff | "@Override
public void actionPerformed(ActionEvent arg0) {
System.out.println("Turn is ENDED!!!");
haveIalreadyRolled = false;
endTurn();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "@Override
public void actionPerformed(ActionEvent arg0) {
<MASK>endTurn();</MASK>
System.out.println("Turn is ENDED!!!");
haveIalreadyRolled = false;
}" |
Inversion-Mutation | megadiff | "private static ConeErrorPolicy[] getConeErrorPolicies() {
List plist = new ArrayList();
plist.add( ConeErrorPolicy.ABORT );
plist.add( ConeErrorPolicy.IGNORE );
int[] retries = new int[] { 1, 2, 3, 5, 10, };
for ( int i = 0; i < retries.length; i++ ) {
int ntr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getConeErrorPolicies" | "private static ConeErrorPolicy[] getConeErrorPolicies() {
List plist = new ArrayList();
<MASK>plist.add( ConeErrorPolicy.IGNORE );</MASK>
plist.add( ConeErrorPolicy.ABORT );
int[] retries = new int[] { 1, 2, 3, 5, 10, };
for ( int i = 0; i < retries.length; i++ ) {
... |
Inversion-Mutation | megadiff | "@Override
public void createQuestionComponent(ViewGroup questionComponent) {
mFreeText = new EditText(getActivity());
beforeAddViewHook(mFreeText);
mFreeText.setHint(R.string.free_response_edittext);
mFreeText.addTextChangedListener(new TextWatcher() {
public void onT... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createQuestionComponent" | "@Override
public void createQuestionComponent(ViewGroup questionComponent) {
mFreeText = new EditText(getActivity());
mFreeText.setHint(R.string.free_response_edittext);
mFreeText.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start, ... |
Inversion-Mutation | megadiff | "protected void doWriteObject(final Object original, final boolean unshared) throws IOException {
final ClassExternalizerFactory classExternalizerFactory = this.classExternalizerFactory;
final ObjectResolver objectResolver = this.objectResolver;
Object obj = original;
Class<?> objCla... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doWriteObject" | "protected void doWriteObject(final Object original, final boolean unshared) throws IOException {
final ClassExternalizerFactory classExternalizerFactory = this.classExternalizerFactory;
final ObjectResolver objectResolver = this.objectResolver;
Object obj = original;
Class<?> objCla... |
Inversion-Mutation | megadiff | "public void readData(SpoutInputStream input) throws IOException {
int id = input.readInt();
long msb = input.readLong();
long lsb = input.readLong();
int size = input.readInt();
int version = input.readShort();
byte[] widgetData = new byte[size];
input.read(widgetData);
SpoutInputStream dat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readData" | "public void readData(SpoutInputStream input) throws IOException {
int id = input.readInt();
long msb = input.readLong();
long lsb = input.readLong();
int size = input.readInt();
byte[] widgetData = new byte[size];
input.read(widgetData);
SpoutInputStream data = new SpoutInputStream(ByteBuffer... |
Inversion-Mutation | megadiff | "public RabbitMQMessengerService(TransportIdentityProvider ident,
ConnectionStatus status) {
super(ident, status);
mFormat = new MessageFormat(ident);
exchangeKey = new String(encodeRSAPublicKey(ident.userPublicKey()));
queueName = exchangeKey;
factory = new ConnectionFactory();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "RabbitMQMessengerService" | "public RabbitMQMessengerService(TransportIdentityProvider ident,
ConnectionStatus status) {
super(ident, status);
mFormat = new MessageFormat(ident);
exchangeKey = new String(encodeRSAPublicKey(ident.userPublicKey()));
queueName = exchangeKey;
factory = new ConnectionFactory();
... |
Inversion-Mutation | megadiff | "public void run() {
//open the connection
while(true) {
try {
conn = factory.newConnection();
} catch(IOException e) {
signalConnectionStatus("Failed initial AMQP connection", e);
try {
Thread.sleep(30000);
} catch (InterruptedException e1) {
}
co... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
//open the connection
while(true) {
try {
conn = factory.newConnection();
} catch(IOException e) {
signalConnectionStatus("Failed initial AMQP connection", e);
try {
Thread.sleep(30000);
} catch (InterruptedException e1) {
}
co... |
Inversion-Mutation | megadiff | "public void run() {
boolean autoAck = false;
for(;;) {
try {
inChannel = conn.createChannel();
QueueingConsumer consumer = new QueueingConsumer(inChannel);
inChannel.queueDeclare(queueName, true, false, false, null);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
boolean autoAck = false;
<MASK>QueueingConsumer consumer = new QueueingConsumer(inChannel);</MASK>
for(;;) {
try {
inChannel = conn.createChannel();
inChannel.queueDeclare(queueName, true, false, false, null);
... |
Inversion-Mutation | megadiff | "public void onEnable()
{
plugin = this;
new File(getPlugin().getDataFolder().getPath() + File.separator + "skilltrees").mkdir();
File delCraftBukkit = new File(getPlugin().getDataFolder().getPath() + File.separator + "craftbukkit.jar");
if(delCraftBukkit.exists())
{
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable" | "public void onEnable()
{
plugin = this;
new File(getPlugin().getDataFolder().getPath() + File.separator + "skilltrees").mkdir();
File delCraftBukkit = new File(getPlugin().getDataFolder().getPath() + File.separator + "craftbukkit.jar");
if(delCraftBukkit.exists())
{
... |
Inversion-Mutation | megadiff | "private static Envelope getEnvelope( IIOMetadata metaData, int width, int height, ICRS crs )
throws ResourceInitException {
GeoTiffIIOMetadataAdapter geoTIFFMetaData = new GeoTiffIIOMetadataAdapter( metaData );
try {
if ( crs == null ) {
int... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getEnvelope" | "private static Envelope getEnvelope( IIOMetadata metaData, int width, int height, ICRS crs )
throws ResourceInitException {
GeoTiffIIOMetadataAdapter geoTIFFMetaData = new GeoTiffIIOMetadataAdapter( metaData );
try {
<MASK>int modelType = Integer.valueOf( geo... |
Inversion-Mutation | megadiff | "public void mouseMoved(MouseEvent me) {
// Don't rotate unless they're actively looking at the window.
if(!gui.getImageWin().isFocused())
return;
if(me.isAltDown()) {
if(mouseStartX < 0) {
try {
stageStart[0] = mmc.getXPosition(xyStageLabel);
stageStart[1] = mmc.getYPosition(xyStag... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mouseMoved" | "public void mouseMoved(MouseEvent me) {
// Don't rotate unless they're actively looking at the window.
if(!gui.getImageWin().isFocused())
return;
if(me.isAltDown()) {
if(mouseStartX < 0) {
<MASK>mouseStartX = me.getX();</MASK>
try {
stageStart[0] = mmc.getXPosition(xyStageLabel);
... |
Inversion-Mutation | megadiff | "@Override
public String OnExecute(RunsafePlayer player, String[] strings)
{
manager.setVanished(player, false);
RunsafePlayerJoinEvent fake = new RunsafePlayerJoinEvent(new PlayerJoinEvent(player.getRawPlayer(), null));
fake.Fire();
RunsafeServer.Instance.broadcastMessage(fake.getJoinMessage());
re... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "OnExecute" | "@Override
public String OnExecute(RunsafePlayer player, String[] strings)
{
RunsafePlayerJoinEvent fake = new RunsafePlayerJoinEvent(new PlayerJoinEvent(player.getRawPlayer(), null));
fake.Fire();
<MASK>manager.setVanished(player, false);</MASK>
RunsafeServer.Instance.broadcastMessage(fake.getJoinMess... |
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 | "private static NodeRelativePosition toPositionHelper(Node here,
int[] counter)
{
switch (here.getNodeType())
{
case Node.TEXT_NODE:
Text text = (Text) here;
if (counter[0] <= text.getLength())
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "toPositionHelper" | "private static NodeRelativePosition toPositionHelper(Node here,
int[] counter)
{
switch (here.getNodeType())
{
case Node.TEXT_NODE:
Text text = (Text) here;
if (counter[0] <= text.getLength())
... |
Inversion-Mutation | megadiff | "@Before(stages=LifecycleStage.EventHandling)
public void load() {
application = ApplicationActionBean.findApplication(app, version);
if(application != null && className != null) {
for(ConfiguredComponent cc: application.getComponents()) {
if(cc.getClassName().equals... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "load" | "@Before(stages=LifecycleStage.EventHandling)
public void load() {
application = ApplicationActionBean.findApplication(app, version);
if(application != null && className != null) {
for(ConfiguredComponent cc: application.getComponents()) {
if(cc.getClassName().equals... |
Inversion-Mutation | megadiff | "private void showDiff(RevCommit c) throws IOException {
final RevTree a = c.getParent(0).getTree();
final RevTree b = c.getTree();
if (showNameAndStatusOnly)
Diff.nameStatus(out, diffFmt.scan(a, b));
else {
out.flush();
diffFmt.format(a, b);
diffFmt.flush();
}
out.println();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showDiff" | "private void showDiff(RevCommit c) throws IOException {
final RevTree a = c.getParent(0).getTree();
final RevTree b = c.getTree();
if (showNameAndStatusOnly)
Diff.nameStatus(out, diffFmt.scan(a, b));
else {
diffFmt.format(a, b);
diffFmt.flush();
}
out.println();
<MASK>out.flush();</... |
Inversion-Mutation | megadiff | "@Then("status of text (.+) should be (\\w+)")
public void verifyModerationText(String text, String status) {
ArrayList<ModeratedText> list = (ArrayList<ModeratedText>) getBlockRepo().get(
MODERATION_LIST);
if (list == null || list.size() == 0)
fail("No moderation te... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "verifyModerationText" | "@Then("status of text (.+) should be (\\w+)")
public void verifyModerationText(String text, String status) {
ArrayList<ModeratedText> list = (ArrayList<ModeratedText>) getBlockRepo().get(
MODERATION_LIST);
if (list == null || list.size() == 0)
fail("No moderation te... |
Inversion-Mutation | megadiff | "@Override
public void onEvent(Event e) {
auditLog.info(String.format(
"%s principalType=%s principal=%s target=%s entityId=%s type=%s owner=%s\n",
df.format(e.getTimestamp()),
e.getPrincipal().getType(),
e.getPrincipal().getName(),
e.getTa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEvent" | "@Override
public void onEvent(Event e) {
auditLog.info(String.format(
"%s principalType=%s principal=%s target=%s entityId=%s type=%s owner=%s\n",
df.format(e.getTimestamp()),
e.getPrincipal().getType(),
e.getPrincipal().getName(),
<MASK>e.... |
Inversion-Mutation | megadiff | "public Graph<Integer,Number> getGraph() {
Factory<Graph<Integer,Number>> graphFactory =
new Factory<Graph<Integer,Number>>() {
public Graph<Integer,Number> create() {
return new SparseMultigraph<Integer,Number>();
}
};
Factory<Integer> vertexFactory =
new Factory<... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getGraph" | "public Graph<Integer,Number> getGraph() {
Factory<Graph<Integer,Number>> graphFactory =
new Factory<Graph<Integer,Number>>() {
public Graph<Integer,Number> create() {
return new SparseMultigraph<Integer,Number>();
}
};
Factory<Integer> vertexFactory =
new Factory<... |
Inversion-Mutation | megadiff | "public void incr() throws IOException {
long dt = Math.min(incr_time, max_time-cur_time);
cur_time += dt;
for ( Generator generator : generators ){
generator.incr(dt);
}
flush();
for ( Incrementable incr : incrementors ){
incr.incr(dt);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "incr" | "public void incr() throws IOException {
long dt = Math.min(incr_time, max_time-cur_time);
for ( Generator generator : generators ){
generator.incr(dt);
}
flush();
for ( Incrementable incr : incrementors ){
incr.incr(dt);
}
<MASK>cur_time += dt;</MASK>
}" |
Inversion-Mutation | megadiff | "public void dumpXMLFile(String fileName)
throws IOException
{
Xml.Technology t = new Xml.Technology();
t.techName = getTechName();
t.shortTechName = getTechName();
t.description = getTechDescription();
t.minNumMetals = t.maxNumMetals = t.defaultNumMetals = g... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dumpXMLFile" | "public void dumpXMLFile(String fileName)
throws IOException
{
Xml.Technology t = new Xml.Technology();
t.techName = getTechName();
t.shortTechName = getTechName();
t.description = getTechDescription();
t.minNumMetals = t.maxNumMetals = t.defaultNumMetals = g... |
Inversion-Mutation | megadiff | "public void copyMetadataObjects(final String pid, String srcDir, String dstDir, final boolean overwriteExisting) throws IOException {
final Map<String,MetadataObject> storedObjectsByIdentifier = new HashMap<String,MetadataObject>();
final Map<String,MetadataObject> storedObjectsById = new HashMap<Str... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "copyMetadataObjects" | "public void copyMetadataObjects(final String pid, String srcDir, String dstDir, final boolean overwriteExisting) throws IOException {
final Map<String,MetadataObject> storedObjectsByIdentifier = new HashMap<String,MetadataObject>();
final Map<String,MetadataObject> storedObjectsById = new HashMap<Str... |
Inversion-Mutation | megadiff | "public String storeObjectWithDependencies(MetadataObject o) {
l.debug("Executing storeObjectWithDependencies "+o.toString());
MetadataObject r = null;
String identifier = o.getIdentifier();
String tp = o.getType();
if(!processedObject... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "storeObjectWithDependencies" | "public String storeObjectWithDependencies(MetadataObject o) {
l.debug("Executing storeObjectWithDependencies "+o.toString());
MetadataObject r = null;
String identifier = o.getIdentifier();
String tp = o.getType();
if(!processedObject... |
Inversion-Mutation | megadiff | "@SuppressWarnings("deprecation")
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (userName == null || password.equals("")) {
errors.add("User Name:", new ActionError("error.userName"));
errors.add("Password:", new Action... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "validate" | "@SuppressWarnings("deprecation")
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (userName == null || password.equals("")) {
errors.add("User Name:", new ActionError("error.userName"));
errors.add("Password:", new Action... |
Inversion-Mutation | megadiff | "public MapView( MindMap model, Controller controller ) {
super();
this.model = model;
this.controller= controller;
mCenterNodeTimer = new Timer();
// initialize the standard colors.
if (standardNodeTextColor == null) {
try{
String stdcolor =... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MapView" | "public MapView( MindMap model, Controller controller ) {
super();
this.model = model;
this.controller= controller;
// initialize the standard colors.
if (standardNodeTextColor == null) {
try{
String stdcolor = getController().getFrame().getProper... |
Inversion-Mutation | megadiff | "@Before
public void setup() {
from = new DateTime(DateTimeZones.UTC);
to = new DateTime(DateTimeZones.UTC);
request = new StubHttpServletRequest();
response = new StubHttpServletResponse();
channel = new Channel.Builder().build();
when(configFetcher... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setup" | "@Before
public void setup() {
<MASK>to = new DateTime(DateTimeZones.UTC);</MASK>
from = new DateTime(DateTimeZones.UTC);
request = new StubHttpServletRequest();
response = new StubHttpServletResponse();
channel = new Channel.Builder().build();
when(... |
Inversion-Mutation | megadiff | "private void outputThisTrack(Track theTrack, String scenarioName)
{
ObjectMapper mapper = new ObjectMapper();
ObjectNode root = mapper.createObjectNode();
ObjectNode metadata = mapper.createObjectNode();
root.put("metadata",metadata);
// sort out the metadata
metadata.put("Platform", theTrack.ge... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "outputThisTrack" | "private void outputThisTrack(Track theTrack, String scenarioName)
{
ObjectMapper mapper = new ObjectMapper();
ObjectNode root = mapper.createObjectNode();
ObjectNode metadata = mapper.createObjectNode();
root.put("metadata",metadata);
// sort out the metadata
metadata.put("Platform", theTrack.ge... |
Inversion-Mutation | megadiff | "private ILaunchConfiguration createConfiguration(
ILaunchConfiguration configuration) throws CoreException {
String configurationName =
"MakeGood" + Long.toString(System.currentTimeMillis()); //$NON-NLS-1$
String junitXMLFile =
JUnitXMLRegistry.getRegistry().getAbso... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createConfiguration" | "private ILaunchConfiguration createConfiguration(
ILaunchConfiguration configuration) throws CoreException {
String configurationName =
"MakeGood" + Long.toString(System.currentTimeMillis()); //$NON-NLS-1$
String junitXMLFile =
JUnitXMLRegistry.getRegistry().getAbso... |
Inversion-Mutation | megadiff | "@cli.System.Security.SecuritySafeCriticalAttribute.Annotation
private void copyToBitmap(int width, int height, int[] pixelData)
{
long size = (long)width * (long)height;
if (size > pixelData.length)
{
throw new IllegalArgumentException();
}
bitmap = c... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "copyToBitmap" | "@cli.System.Security.SecuritySafeCriticalAttribute.Annotation
private void copyToBitmap(int width, int height, int[] pixelData)
{
long size = (long)width * (long)height;
if (size > pixelData.length)
{
throw new IllegalArgumentException();
}
synchroni... |
Inversion-Mutation | megadiff | "public void fixupBlockExpression (JFXBlockExpression body, JFXClassDeclaration module) {
boolean changed = false;
ListBuffer<JCStatement> stats = new ListBuffer<JCStatement>();
for (JCStatement stat : body.stats) {
if (stat instanceof JFXVar) {
JFXVar decl = (... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "fixupBlockExpression" | "public void fixupBlockExpression (JFXBlockExpression body, JFXClassDeclaration module) {
boolean changed = false;
ListBuffer<JCStatement> stats = new ListBuffer<JCStatement>();
for (JCStatement stat : body.stats) {
if (stat instanceof JFXVar) {
JFXVar decl = (... |
Inversion-Mutation | megadiff | "public void testSave( ) throws IOException
{
ArchiveFile file = new ArchiveFile( "test.archive", "rwt" );
ArchiveEntry entry = file.createEntry( "/name" );
byte[] bytes = new byte[255];
for ( int i = 0; i < 255; i++ )
{
bytes[i] = (byte) i;
}
entry.write( 0, bytes, 0, 255 );
file.save( );... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testSave" | "public void testSave( ) throws IOException
{
ArchiveFile file = new ArchiveFile( "test.archive", "rwt" );
ArchiveEntry entry = file.createEntry( "/name" );
byte[] bytes = new byte[255];
for ( int i = 0; i < 255; i++ )
{
bytes[i] = (byte) i;
}
entry.write( 0, bytes, 0, 255 );
file.save( );... |
Inversion-Mutation | megadiff | "protected void undeployBeans(KernelController controller, KernelDeployment deployment)
{
Set<NamedAliasMetaData> aliases = deployment.getAliases();
if (aliases != null && aliases.isEmpty() == false)
{
for (NamedAliasMetaData alias : aliases)
controller.removeAlias(alias... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "undeployBeans" | "protected void undeployBeans(KernelController controller, KernelDeployment deployment)
{
<MASK>super.undeployBeans(controller, deployment);</MASK>
Set<NamedAliasMetaData> aliases = deployment.getAliases();
if (aliases != null && aliases.isEmpty() == false)
{
for (NamedAliasMet... |
Inversion-Mutation | megadiff | "protected Engine(java.util.Properties properties) {
name = "CoreASM" + Tools.lFormat(++lastEngineId, 5);
this.properties = new EngineProperties();
if (properties != null)
this.properties.putAll(properties);
storage = new HashStorage(this);
scheduler = new SchedulerImp(this);
parser = new JParse... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Engine" | "protected Engine(java.util.Properties properties) {
name = "CoreASM" + Tools.lFormat(++lastEngineId, 5);
this.properties = new EngineProperties();
if (properties != null)
this.properties.putAll(properties);
storage = new HashStorage(this);
scheduler = new SchedulerImp(this);
parser = new JParse... |
Inversion-Mutation | megadiff | "@Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
LightBox lb = (LightBox) component;
encodeMarkup(context, lb);
encodeScript(context, lb);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeEnd" | "@Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
LightBox lb = (LightBox) component;
<MASK>encodeScript(context, lb);</MASK>
encodeMarkup(context, lb);
}" |
Inversion-Mutation | megadiff | "public synchronized void setRecord(long recordStorePk, int recordId, byte[] data) throws RecordStoreException {
byte[] oldData = getRecord(recordStorePk,recordId);
ContentValues values = new ContentValues();
values.put(COLUMNNAME_RECORD_DATA, data);
try {
database.beginTransaction();
database.updat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setRecord" | "public synchronized void setRecord(long recordStorePk, int recordId, byte[] data) throws RecordStoreException {
ContentValues values = new ContentValues();
values.put(COLUMNNAME_RECORD_DATA, data);
try {
database.beginTransaction();
database.update(TABLENAME_RECORD, values, COLUMNNAME_RECORD_RECORDST... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Setup default values for the settings.
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
// Setup view.
setContentView(R.layout.main);
//... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Setup default values for the settings.
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
// Setup view.
setContentView(R.layout.main);
//... |
Inversion-Mutation | megadiff | "public static void main(String[] args) {
initializateLogger();
CommandLineParameters clp = new CommandLineParameters();
clp.load(args);
Logger.getRootLogger().setLevel(clp.getLoggingLevel());
try{
Sniffer sniffer = new Sniffer();
ArgsPresentator.displayAppHeader();
sniffer.sniff(clp.get... | 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) {
initializateLogger();
CommandLineParameters clp = new CommandLineParameters();
clp.load(args);
Logger.getRootLogger().setLevel(clp.getLoggingLevel());
<MASK>Sniffer sniffer = new Sniffer();</MASK>
try{
ArgsPresentator.displayAppHeader();
sniffer.s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.