nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ClubActivity extends Activity { private Button mClubListButton ; private Button mCalendarButton ; private Button mClubDetailsButton ; private Button mAddClubButton ; private Button mBackButton ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( club_home ) ; mClubListButton = ( ( Button ) ( findViewById ( clubHomeClubListButtonId ) ) ) ; mCalendarButton = ( ( Button ) ( findViewById ( clubHomeCalendarButtonId ) ) ) ; mClubDetailsButton = ( ( Button ) ( findViewById ( clubHomeClubDetailsButtonId ) ) ) ; mAddClubButton = ( ( Button ) ( findViewById ( clubHomeAddClubButtonId ) ) ) ; mBackButton = ( ( Button ) ( findViewById ( clubHomeBackButtonId ) ) ) ; mBackButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { finish ( ) ; } } ) ; mClubListButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent userIntent ; userIntent = new Intent ( "ClubMasterList" ) ; startActivity ( userIntent ) ; } } ) ; mCalendarButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent userIntent ; <START_BUG> userIntent = new Intent ( "calendar" ) ; <END_BUG> userIntent . putExtra ( "fromClub" , true ) ; startActivity ( userIntent ) ; } } ) ; mClubDetailsButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent userIntent ; userIntent = new Intent ( ClubActivity . this , ClubClubView . class ) ; startActivity ( userIntent ) ; } } ) ; mAddClubButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent userIntent ; userIntent = new Intent ( ClubActivity . this , AddClub . class ) ; startActivity ( userIntent ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
userIntent = new Intent ( "Calendar" ) ;
Buggy code:
public final class ListUnivariateImplTest extends TestCase { private double one = 1 ; private float two = 2 ; private int three = 3 ; private double mean = 2 ; private double sumSq = 18 ; private double sum = 8 ; private double var = 0.6666666666666666 ; private double std = Math . sqrt ( var ) ; private double n = 4 ; private double min = 1 ; private double max = 3 ; private double tolerance = 1.0E-14 ; public ListUnivariateImplTest ( String name ) { } public void setUp ( ) { } public static Test suite ( ) { } public void testStats ( ) { } public void testN0andN1Conditions ( ) throws Exception { List < Object > list = new ArrayList < Object > ( ) ; DescriptiveStatistics u = new ListUnivariateImpl ( list ) ; assertTrue ( "Mean<seq2seq4repair_space>of<seq2seq4repair_space>n<seq2seq4repair_space>=<seq2seq4repair_space>0<seq2seq4repair_space>set<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>NaN" , Double . isNaN ( u . getMean ( ) ) ) ; assertTrue ( "Standard<seq2seq4repair_space>Deviation<seq2seq4repair_space>of<seq2seq4repair_space>n<seq2seq4repair_space>=<seq2seq4repair_space>0<seq2seq4repair_space>set<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>NaN" , Double . isNaN ( u . getStandardDeviation ( ) ) ) ; assertTrue ( "Variance<seq2seq4repair_space>of<seq2seq4repair_space>n<seq2seq4repair_space>=<seq2seq4repair_space>0<seq2seq4repair_space>set<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>NaN" , Double . isNaN ( u . getVariance ( ) ) ) ; <START_BUG> list . add ( new Double ( one ) ) ; <END_BUG> assertTrue ( "Mean<seq2seq4repair_space>of<seq2seq4repair_space>n<seq2seq4repair_space>=<seq2seq4repair_space>1<seq2seq4repair_space>set<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>value<seq2seq4repair_space>of<seq2seq4repair_space>single<seq2seq4repair_space>item<seq2seq4repair_space>n1" , ( ( u . getMean ( ) ) == ( one ) ) ) ; assertTrue ( ( "StdDev<seq2seq4repair_space>of<seq2seq4repair_space>n<seq2seq4repair_space>=<seq2seq4repair_space>1<seq2seq4repair_space>set<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>zero,<seq2seq4repair_space>instead<seq2seq4repair_space>it<seq2seq4repair_space>is:<seq2seq4repair_space>" + ( u . getStandardDeviation ( ) ) ) , ( ( u . getStandardDeviation ( ) ) == 0 ) ) ; assertTrue ( "Variance<seq2seq4repair_space>of<seq2seq4repair_space>n<seq2seq4repair_space>=<seq2seq4repair_space>1<seq2seq4repair_space>set<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>zero" , ( ( u . getVariance ( ) ) == 0 ) ) ; } public void testSkewAndKurtosis ( ) { } public void testProductAndGeometricMean ( ) throws Exception { } public void testSerialization ( ) { } }

Fix:
list . add ( Double . valueOf ( one ) ) ;
Buggy code:
@ Component public class StorageAgentClientFactory { private static Map < String , StorageAgentClient > storageAgentClients = new HashMap < > ( ) ; private final boolean runningIntegrationTest ; private final AffinityBasedStorageAgentRetriever storageAgentRetriever ; @ Autowired public StorageAgentClientFactory ( @ Value ( "${app.running.integration.test}" ) boolean runningIntegrationTest , AffinityBasedStorageAgentRetriever storageAgentRetriever ) { } public synchronized StorageAgentClient getBestStorageAgent ( IscsiTarget iscsiTarget ) { StorageAgent bestStorageAgent = storageAgentRetriever . getStorageAgent ( iscsiTarget ) ; <START_BUG> String serverUrl = bestStorageAgent . getAgentNode ( ) ; <END_BUG> StorageAgentClient storageAgentClient = StorageAgentClientFactory . storageAgentClients . get ( serverUrl ) ; if ( storageAgentClient != null ) { return storageAgentClient ; } WebTarget client = createClient ( serverUrl ) ; if ( runningIntegrationTest ) { storageAgentClient = new com . bitwisekaizen . sdss . management . config . InMemoryStorageAgentClient ( client ) ; } else { storageAgentClient = new StorageAgentClient ( client ) ; } StorageAgentClientFactory . storageAgentClients . put ( storageAgentClient . getStorageAgentUrl ( ) , storageAgentClient ) ; return storageAgentClient ; } public synchronized StorageAgentClient getStorageClientUsedInCreating ( UniqueIscsiTargetEntity uniqueIscsiTargetEntity ) { } private WebTarget createClient ( String serverUrl ) { } }

Fix:
String serverUrl = bestStorageAgent . getServerUrl ( ) ;
Buggy code:
public class StandaloneXml extends CommonXml { public StandaloneXml ( final ModuleLoader loader ) { } @ Override public void readElement ( final XMLExtendedStreamReader reader , final List < ModelNode > operationList ) throws XMLStreamException { } private void readServerElement ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private void parseSocketBindingGroup ( final XMLExtendedStreamReader reader , final Set < String > interfaces , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private void parseServerProfile ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private void setServerName ( final ModelNode address , final List < ModelNode > operationList , final String value ) { } @ Override public void writeContent ( final XMLExtendedStreamWriter writer , final ModelMarshallingContext context ) throws XMLStreamException { } private void writeServerDeployments ( final XMLExtendedStreamWriter writer , final ModelNode modelNode ) throws XMLStreamException { Set < String > deploymentNames = modelNode . keys ( ) ; if ( ( deploymentNames . size ( ) ) > 0 ) { boolean deploymentWritten = false ; for ( String uniqueName : deploymentNames ) { final ModelNode deployment = modelNode . get ( uniqueName ) ; <START_BUG> if ( ! ( deployment . get ( PERSISTENT ) . asBoolean ( ) ) ) { <END_BUG> continue ; } if ( ! deploymentWritten ) { writer . writeStartElement ( DEPLOYMENTS . getLocalName ( ) ) ; deploymentWritten = true ; } final String runtimeName = deployment . get ( RUNTIME_NAME ) . asString ( ) ; boolean enabled = deployment . get ( ENABLED ) . asBoolean ( ) ; writer . writeStartElement ( DEPLOYMENT . getLocalName ( ) ) ; writeAttribute ( writer , NAME , uniqueName ) ; writeAttribute ( writer , Attribute . RUNTIME_NAME , runtimeName ) ; if ( ! enabled ) { writeAttribute ( writer , Attribute . ENABLED , "false" ) ; } final List < ModelNode > contentItems = deployment . require ( CONTENT ) . asList ( ) ; for ( ModelNode contentItem : contentItems ) { writeContentItem ( writer , contentItem ) ; } writer . writeEndElement ( ) ; } if ( deploymentWritten ) { writer . writeEndElement ( ) ; } } } private void writeServerProfile ( final XMLExtendedStreamWriter writer , final ModelMarshallingContext context ) throws XMLStreamException { } }

Fix:
if ( ( deployment . hasDefined ( PERSISTENT ) ) && ( ! ( deployment . get ( PERSISTENT ) . asBoolean ( ) ) ) ) {
Buggy code:
@ SuppressWarnings ( "serial" ) public class Loader extends JFrame { private CurrentStats currentStats ; private FoodList foodList ; private int x ; private int y ; private int w ; private int h ; private static ResourceLoader resourceLoader ; public static boolean POP_UP_OPEN = false ; public static JFrame POP_UP ; private static Loader LOADER ; private Menu menu ; private Loader ( ) { } private void init ( ) { setTitle ( "Diet<seq2seq4repair_space>Tracker" ) ; <START_BUG> setSize ( 900 , 480 ) ; <END_BUG> setLocationRelativeTo ( null ) ; setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; getContentPane ( ) . setBackground ( Color . DARK_GRAY ) ; setMinimumSize ( new Dimension ( 900 , 480 ) ) ; setUndecorated ( true ) ; addWindowFocusListener ( new WindowFocusListener ( ) { public void windowGainedFocus ( WindowEvent e ) { if ( Loader . POP_UP_OPEN ) { Toolkit . getDefaultToolkit ( ) . beep ( ) ; Loader . POP_UP . requestFocus ( ) ; } } public void windowLostFocus ( WindowEvent e ) { } } ) ; } private void addComponents ( ) { } public void maximize ( ) { } public void normalize ( ) { } public void minimize ( ) { } public void setPosition ( int x , int y ) { } public FoodList getFoodList ( ) { } public CurrentStats getCurrentStats ( ) { } public Menu getMenu ( ) { } public static void main ( String [ ] args ) { } public static ResourceLoader getResourceLoader ( ) { } public static Loader getInstance ( ) { } No newline ; at end ; of file ; }

Fix:
setSize ( 900 , 640 ) ;
Buggy code:
public class ProcessParser { public ProcessParser ( ProcessModel pm ) { } private Document doc ; private ProcessModel prm ; public static String nsm = "http:////masterteamproject//" ; public static String nsmi = "http:////masterteamproject//instance//" ; public static String nsboi = "http:////masterteamproject//business_object_instance//" ; private static String getUID ( ) { } private List < Element > flows = new ArrayList < Element > ( ) ; private void postprocessFlows ( ProcessModel pm ) { } private void createFlow ( Element el , ProcessModel pm ) { Node source = pm . getSPANodeById ( ( ( ProcessParser . nsm ) + ( el . getAttribute ( "sourceRef" ) ) ) ) ; Node target = pm . getSPANodeById ( ( ( ProcessParser . nsm ) + ( el . getAttribute ( "targetRef" ) ) ) ) ; Flow f = new Flow ( pm . getSPAProcessModel ( ) , source , target ) ; if ( ( el . getAttribute ( "id" ) ) != null ) { f . setId ( ( ( ProcessParser . nsm ) + ( el . getAttribute ( "id" ) ) ) ) ; } else { f . setId ( ( ( ProcessParser . nsm ) + ( ProcessParser . getUID ( ) ) ) ) ; } <START_BUG> if ( ( el . getAttribute ( "name" ) ) != null ) { <END_BUG> f . setCondition ( el . getAttribute ( "name" ) ) ; } source . getNextFlows ( ) . add ( f ) ; } private void handleChildren ( org . w3c . dom . Node n , ProcessModel pm ) { } private ProcessModel parseProcess ( ProcessModel pm , Element ele ) { } public void parseXML ( File file ) throws IncorrectNumberOfProcessModelsExeption { } }

Fix:
if ( ( ( el . getAttribute ( "name" ) ) != null ) && ( ( el . getAttribute ( "name" ) . length ( ) ) > 0 ) ) {
Buggy code:
public class Snippet188 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new GridLayout ( ) ) ; final ScrolledComposite sc = new ScrolledComposite ( shell , ( ( ( SWT . BORDER ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) ) ; sc . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true , 1 , 1 ) ) ; Composite c = new Composite ( sc , SWT . NONE ) ; c . setLayout ( new GridLayout ( 10 , true ) ) ; for ( int i = 0 ; i < 300 ; i ++ ) { Button b = new Button ( c , SWT . PUSH ) ; b . setText ( ( "Button<seq2seq4repair_space>" + i ) ) ; } sc . setContent ( c ) ; sc . setExpandHorizontal ( true ) ; sc . setExpandVertical ( true ) ; sc . setMinSize ( c . computeSize ( DEFAULT , DEFAULT ) ) ; <START_BUG> sc . setAutoScroll ( true ) ; <END_BUG> shell . setSize ( 300 , 500 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
sc . setShowFocusedControl ( true ) ;
Buggy code:
public final class ReflectionOperations extends AbstractExecutionContextAware { public Object newInstance ( BackendType t ) { } public boolean isInstance ( BackendType t , Object o ) { } public boolean isAssignableFrom ( BackendType t1 , BackendType t2 ) { } public Property getProperty ( BackendType t , String name ) { <START_BUG> return t . getProperties ( ) . get ( name ) ; <END_BUG> } public StaticProperty getStaticProperty ( BackendType t , String name ) { } public Function getOperation ( BackendType t , String name , List < BackendType > paramTypes ) { } public Object get ( Property p , Object o ) { } public void set ( Property p , Object o , Object value ) { } public Object get ( StaticProperty p ) { } }

Fix:
return t . getProperties ( _ctx ) . get ( name ) ;
Buggy code:
public class SVGBaseBitmapTextureAtlasSource extends PictureBitmapTextureAtlasSource { private final SVG mSVG ; public SVGBaseBitmapTextureAtlasSource ( final SVG pSVG ) { } public SVGBaseBitmapTextureAtlasSource ( final SVG pSVG , final float pScale ) { } public SVGBaseBitmapTextureAtlasSource ( final SVG pSVG , final int pTexturePositionX , final int pTexturePositionY , final float pScale ) { } public SVGBaseBitmapTextureAtlasSource ( final SVG pSVG , final int pWidth , final int pHeight ) { } public SVGBaseBitmapTextureAtlasSource ( final SVG pSVG , final int pTexturePositionX , final int pTexturePositionY , final int pWidth , final int pHeight ) { } @ Override public SVGBaseBitmapTextureAtlasSource deepCopy ( ) { Debug . w ( ( ( this . getClass ( ) . getSimpleName ( ) ) + ".deepCopy()<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>actually<seq2seq4repair_space>deepCopy<seq2seq4repair_space>the<seq2seq4repair_space>SVG!" ) ) ; <START_BUG> return new SVGBaseBitmapTextureAtlasSource ( this . mSVG , this . mTextureX , this . mTextureY , this . mTextureWidth , this . mTextureHeight ) ; <END_BUG> } }

Fix:
return new SVGBaseBitmapTextureAtlasSource ( this . mSVG , this . mTexturePositionX , this . mTexturePositionY , this . mWidth , this . mHeight ) ;
Buggy code:
public class ThreadMXBeanThreadInfosHandler implements OperationStepHandler , DescriptionProvider { public static final ThreadMXBeanThreadInfosHandler INSTANCE = new ThreadMXBeanThreadInfosHandler ( ) ; private final ParametersValidator idsValidator = new ParametersValidator ( ) ; private final ParametersValidator depthValidator = new ParametersValidator ( ) ; private final ParametersValidator lockedValidator = new ParametersValidator ( ) ; private ThreadMXBeanThreadInfosHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { <START_BUG> return PlatformMBeanDescriptions . getGetThreadInfosDescripton ( locale ) ; <END_BUG> } private long [ ] getIds ( final ModelNode operation ) throws OperationFailedException { } }

Fix:
return PlatformMBeanDescriptions . getGetThreadInfosDescription ( locale ) ;
Buggy code:
public class VoiceWakeupSettings extends SettingsPreferenceFragment implements OnPreferenceChangeListener , BaseSystemSettingSwitchBar . SwitchBarChangeCallback , ShortcutPickHelper . OnPickListener { private static final String TAG = "VoiceWakeupSettings" ; private static final String KEY_RETRAIN = "retrain" ; private static final String KEY_SHORTCUT_PICKER = "voice_wakeup_launch_intent" ; private static final ComponentName VOICE_TRAINING_COMPONENT = new ComponentName ( "com.cyanogenmod.voicewakeup" , "com.cyanogenmod.voicewakeup.VoiceTrainingActivity" ) ; private static final ComponentName VOICE_TRAINING_SERVICE = new ComponentName ( "com.cyanogenmod.voicewakeup" , "com.cyanogenmod.voicewakeup.VoiceWakeupEngine" ) ; private BaseSystemSettingSwitchBar mVoiceWakeupEnabler ; private ShortcutPickHelper mPicker ; private String mDefaultActivityString ; private String mLaunchIntentString ; ViewGroup mContainer ; private Preference mRetrainPreference ; private Preference mPickShortcutPreference ; private void log ( String s ) { } private void retrain ( ) { } private void restartService ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onStart ( ) { } @ Override public void onDestroyView ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public void onPause ( ) { } @ Override public void onResume ( ) { } public boolean onPreferenceTreeClick ( PreferenceScreen preferenceScreen , Preference preference ) { if ( preference == ( mRetrainPreference ) ) { retrain ( ) ; return true ; } else if ( preference == ( mPickShortcutPreference ) ) { String [ ] names = new String [ ] { mDefaultActivityString } ; <START_BUG> ShortcutIconResource [ ] icons = new ShortcutIconResource [ ] { ShortcutIconResource . fromContext ( getActivity ( ) , ic_voice_wakeup ) } ; <END_BUG> mPicker . pickShortcut ( names , icons , getId ( ) ) ; return true ; } return super . onPreferenceTreeClick ( preferenceScreen , preference ) ; } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void shortcutPicked ( String uri , String friendlyName , boolean isApplication ) { } @ Override public boolean onPreferenceChange ( Preference preference , Object newValue ) { } @ Override public void onEnablerChanged ( boolean isEnabled ) { } }

Fix:
ShortcutIconResource [ ] icons = new ShortcutIconResource [ ] { ShortcutIconResource . fromContext ( getActivity ( ) , ic_settings_voice_wakeup ) } ;
Buggy code:
public class ApplicationContextEventTests { @ Test public void simpleApplicationEventMulticaster ( ) { } @ Test public void orderedListeners ( ) { } @ Test public void testEventPublicationInterceptor ( ) throws Throwable { } @ Test public void listenersInApplicationContext ( ) { } @ Test public void listenerAndBroadcasterWithCircularReference ( ) { } @ Test public void innerBeanAsListener ( ) { StaticApplicationContext context = new StaticApplicationContext ( ) ; RootBeanDefinition listenerDef = new RootBeanDefinition ( TestBean . class ) ; <START_BUG> listenerDef . getPropertyValues ( ) . addPropertyValue ( "friends" , new RootBeanDefinition ( BeanThatListens . class ) ) ; <END_BUG> context . registerBeanDefinition ( "listener" , listenerDef ) ; context . refresh ( ) ; context . publishEvent ( new ApplicationContextEventTests . MyEvent ( this ) ) ; context . publishEvent ( new ApplicationContextEventTests . MyEvent ( this ) ) ; TestBean listener = context . getBean ( TestBean . class ) ; assertEquals ( 3 , ( ( BeanThatListens ) ( listener . getFriends ( ) . iterator ( ) . next ( ) ) ) . getEventCount ( ) ) ; } public static class MyEvent extends ApplicationEvent { public MyEvent ( Object source ) { } } public static class MyOtherEvent extends ApplicationEvent { public MyOtherEvent ( Object source ) { } } public static class MyOrderedListener1 implements ApplicationListener , Ordered { public final Set < ApplicationEvent > seenEvents = new HashSet < ApplicationEvent > ( ) ; public void onApplicationEvent ( ApplicationEvent event ) { } public int getOrder ( ) { } } public interface MyOrderedListenerIfc < E extends ApplicationEvent > extends ApplicationListener < E > , Ordered { } public abstract static class MyOrderedListenerBase implements ApplicationContextEventTests . MyOrderedListenerIfc < ApplicationContextEventTests . MyEvent > { public int getOrder ( ) { } } public static class MyOrderedListener2 extends ApplicationContextEventTests . MyOrderedListenerBase { private final ApplicationContextEventTests . MyOrderedListener1 otherListener ; public MyOrderedListener2 ( ApplicationContextEventTests . MyOrderedListener1 otherListener ) { } public void onApplicationEvent ( ApplicationContextEventTests . MyEvent event ) { } } }

Fix:
listenerDef . getPropertyValues ( ) . add ( "friends" , new RootBeanDefinition ( BeanThatListens . class ) ) ;
Buggy code:
public class GameMap implements Serializable { private static Graph graph ; private GraphNode [ ] [ ] aNodes ; private Tile [ ] [ ] aTiles ; private static Random rTreesAndMeadows = new Random ( ) ; private Collection < Village > aVillages ; private HashMap < Tile , GraphNode > TileToNodeHashMap = new HashMap < Tile , GraphNode > ( ) ; private HashMap < Coordinates , Tile > CoordinatesToTileMap = new HashMap < Coordinates , Tile > ( ) ; private Collection < Color > availableColors ; public GameMap ( int height , int width , Collection < Color > pAvailableColors ) { } public Tile getTile ( Coordinates pCoord ) { } public void printTiles ( ) { } public void generateTrees ( ) { System . out . println ( "[Server]<seq2seq4repair_space>Attempting<seq2seq4repair_space>to<seq2seq4repair_space>grow<seq2seq4repair_space>trees." ) ; ArrayList < GraphNode > lGraphNodes = new ArrayList < GraphNode > ( ) ; for ( int i = 0 ; i < ( aNodes . length ) ; i ++ ) { for ( int j = 0 ; j < ( aNodes [ i ] . length ) ; j ++ ) { lGraphNodes . add ( aNodes [ i ] [ j ] ) ; } } Random rand1 = new Random ( ) ; Random rand2 = new Random ( ) ; for ( GraphNode lNode : lGraphNodes ) { if ( lNode . getTile ( ) . getStructureType ( ) . equals ( TREE ) ) { ArrayList < GraphNode > lNeighbors = ( ( ArrayList < GraphNode > ) ( lNode . getAdjacentNodes ( ) ) ) ; ArrayList < Tile > lTiles = new ArrayList < Tile > ( ) ; for ( GraphNode lNode2 : lNeighbors ) { lTiles . add ( lNode2 . getTile ( ) ) ; } ArrayList < Tile > lNeighboringEmptyOrMeadowTiles = new ArrayList < Tile > ( ) ; for ( Tile lTile : lTiles ) { StructureType lStructureType = lTile . getStructureType ( ) ; <START_BUG> if ( ( ( lStructureType . equals ( NO_STRUCT ) ) || ( lStructureType . equals ( TREE ) ) ) || ( lTile . getVillageType ( ) . equals ( NO_VILLAGE ) ) ) { <END_BUG> lNeighboringEmptyOrMeadowTiles . add ( lTile ) ; } } int max = lNeighboringEmptyOrMeadowTiles . size ( ) ; int randomNum1 = rand1 . nextInt ( max ) ; int randomNum2 = rand2 . nextInt ( 2 ) ; Tile randomlyPickedTile = lNeighboringEmptyOrMeadowTiles . get ( randomNum1 ) ; if ( randomNum2 == 1 ) { randomlyPickedTile . setStructureType ( TREE ) ; randomlyPickedTile . notifyObservers ( ) ; } } } } public void partition ( ) { } public Tile [ ] [ ] getObservables ( ) { } private void setUpMap ( int height , int width ) { } private void randomlyGenerateTreesAndMeadows ( Tile lTile ) { } public Set < Tile > getPossibleMoves ( Tile startTile ) { } private Set < GraphNode > getPossibleMoves ( GraphNode start ) { } public Village getVillage ( Tile crt ) { } private Set < GraphNode > getVillage ( GraphNode crt ) { } public Collection < Tile > getNeighbors ( Tile pTile ) { } public boolean canFuse ( Village v1 , Village v2 ) { } public void fuseVillages ( Village invadedVillage , Village invadingVillage ) { } public GameMap ( ) { } public Collection < Village > getVillages ( ) { } }

Fix:
if ( ( ( ( lStructureType . equals ( NO_STRUCT ) ) || ( lStructureType . equals ( TREE ) ) ) || ( lTile . getVillageType ( ) . equals ( NO_VILLAGE ) ) ) && ( lTile . getUnit ( ) . equals ( NO_UNIT ) ) ) {
Buggy code:
final class SegmentsReader extends IndexReader { protected SegmentReader [ ] readers ; protected int [ ] starts ; private Hashtable normsCache = new Hashtable ( ) ; private int maxDoc = 0 ; private int numDocs = - 1 ; SegmentsReader ( Directory directory , SegmentReader [ ] r ) throws IOException { } public final synchronized int numDocs ( ) { } public final int maxDoc ( ) { } public final Document document ( int n ) throws IOException { } public final boolean isDeleted ( int n ) { } final synchronized void doDelete ( int n ) throws IOException { numDocs = - 1 ; int i = readerIndex ( n ) ; <START_BUG> readers [ i ] . delete ( ( n - ( starts [ i ] ) ) ) ; <END_BUG> } private final int readerIndex ( int n ) { } public final synchronized byte [ ] norms ( String field ) throws IOException { } public final TermEnum terms ( ) throws IOException { } public final TermEnum terms ( Term term ) throws IOException { } public final int docFreq ( Term t ) throws IOException { } public final TermDocs termDocs ( ) throws IOException { } public final TermPositions termPositions ( ) throws IOException { } final synchronized void doClose ( ) throws IOException { } }

Fix:
readers [ i ] . doDelete ( ( n - ( starts [ i ] ) ) ) ;
Buggy code:
class GenericOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final GenericOutboundConnectionAdd INSTANCE = new GenericOutboundConnectionAdd ( ) ; static ModelNode getAddOperation ( final String connectionName , final String uri , PathAddress address ) { } private GenericOutboundConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController installRuntimeService ( final OperationContext context , final ModelNode operation , final ModelNode fullModel , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { } URI getDestinationURI ( final OperationContext context , final ModelNode outboundConnection ) throws OperationFailedException { final String uri = GenericOutboundConnectionResourceDefinition . URI . resolveModelAttribute ( context , outboundConnection ) . asString ( ) ; try { return new URI ( uri ) ; } catch ( URISyntaxException e ) { <START_BUG> throw RemotingMessages . MESSAGES . couldNotCreateURI ( new ModelNode ( ) . set ( ( ( ( "Cannot<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>URI<seq2seq4repair_space>from<seq2seq4repair_space>" + uri ) + "<seq2seq4repair_space>--<seq2seq4repair_space>" ) + ( e . toString ( ) ) ) ) ) ; <END_BUG> } } }

Fix:
throw RemotingMessages . MESSAGES . couldNotCreateURI ( uri , e . toString ( ) ) ;
Buggy code:
public class Publication implements Serializable { private Vector < Author > authors ; private String title ; private Date year ; private String department ; private String venue ; private String yearString ; public Publication ( Vector < Author > authors , String title ) { } public Vector < Author > getAuthors ( ) { } public void setAuthors ( Vector < Author > authors ) { } public String getTitle ( ) { } public void setTitle ( String title ) { } public String getDepartment ( ) { } public void setDepartment ( String department ) { } public Date getYear ( ) { } public void setYear ( Date year ) { } public String getVenue ( ) { } public void setVenue ( String venue ) { } public void setYearString ( String yearString ) { } public String getYearString ( ) { } private synchronized void writeObject ( ObjectOutputStream s ) throws IOException { } private synchronized void readObject ( ObjectInputStream s ) throws IOException , ClassNotFoundException { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( ( "title:" + ( title ) ) + "\n<seq2seq4repair_space>authors:" ) + ( Arrays . toString ( authors . toArray ( new String [ 0 ] ) ) ) ) + "\n<seq2seq4repair_space>year:" ) + ( yearString ) ) + "department:" ) + ( department ) ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( "title:" + ( title ) ) + "\n<seq2seq4repair_space>authors:" ) + ( Arrays . toString ( authors . toArray ( new Author [ 0 ] ) ) ) ) + "\n<seq2seq4repair_space>year:" ) + ( yearString ) ) + "department:" ) + ( department ) ;
Buggy code:
public class StructureIdentifier extends SingleIdentifier { private class TypedefConverter implements CTypeVisitor < CType , HandleCodeException > { @ Override public CType visit ( CArrayType pArrayType ) throws HandleCodeException { } @ Override public CType visit ( CCompositeType pCompositeType ) throws HandleCodeException { } @ Override public CType visit ( CElaboratedType pElaboratedType ) throws HandleCodeException { } @ Override public CType visit ( CEnumType pEnumType ) throws HandleCodeException { } @ Override public CType visit ( CFunctionType pFunctionType ) throws HandleCodeException { } @ Override public CType visit ( CPointerType pPointerType ) throws HandleCodeException { } @ Override public CType visit ( CProblemType pProblemType ) throws HandleCodeException { } @ Override public CType visit ( CSimpleType pSimpleType ) throws HandleCodeException { } @ Override public CType visit ( CTypedefType pTypedefType ) throws HandleCodeException { } @ Override public CType visit ( CVoidType pVoidType ) throws HandleCodeException { } } protected AbstractIdentifier owner ; public StructureIdentifier ( String pNm , CType pTp , int dereference , AbstractIdentifier own ) { } @ Override public String toString ( ) { } @ Override public StructureIdentifier clone ( ) { } public AbstractIdentifier getOwner ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public SingleIdentifier clearDereference ( ) { } @ Override public boolean isGlobal ( ) { } @ Override public boolean isPointer ( ) { } @ Override public String toLog ( ) { } private CType getStructureType ( ) { } @ Override public GeneralIdentifier getGeneralId ( ) { } public StructureFieldIdentifier toStructureFieldIdentifier ( ) { } @ Override public AbstractIdentifier containsIn ( Collection < ? extends AbstractIdentifier > set ) { if ( set . contains ( this ) ) { return this ; } else { AbstractIdentifier ownerContainer = owner . containsIn ( set ) ; if ( ownerContainer == null ) { return null ; } else { <START_BUG> if ( ownerContainer instanceof SingleIdentifier ) { <END_BUG> return ( ( SingleIdentifier ) ( ownerContainer ) ) . getGeneralId ( ) ; } else { return ownerContainer ; } } } } @ Override public DataType getType ( Map < ? extends AbstractIdentifier , DataType > pLocalInfo ) { } }

Fix:
if ( ( ownerContainer instanceof GlobalVariableIdentifier ) || ( ownerContainer instanceof LocalVariableIdentifier ) ) {
Buggy code:
public final class FastFourierTransformerTest extends TestCase { public void testAdHocData ( ) throws MathException { FastFourierTransformer transformer = new FastFourierTransformer ( ) ; Complex [ ] result ; double tolerance = 1.0E-12 ; double [ ] x = new double [ ] { 1.3 , 2.4 , 1.7 , 4.1 , 2.9 , 1.7 , 5.1 , 2.7 } ; Complex [ ] y = new Complex [ ] { new Complex ( 21.9 , 0.0 ) , new Complex ( ( - 2.09497474683058 ) , 1.91507575950825 ) , new Complex ( ( - 2.6 ) , 2.7 ) , new Complex ( ( - 1.10502525316942 ) , ( - 4.88492424049175 ) ) , new Complex ( 0.1 , 0.0 ) , new Complex ( ( - 1.10502525316942 ) , 4.88492424049175 ) , new Complex ( ( - 2.6 ) , ( - 2.7 ) ) , new Complex ( ( - 2.09497474683058 ) , ( - 1.91507575950825 ) ) } ; result = transformer . transform ( x ) ; for ( int i = 0 ; i < ( result . length ) ; i ++ ) { assertEquals ( y [ i ] . getReal ( ) , result [ i ] . getReal ( ) , tolerance ) ; assertEquals ( y [ i ] . getImaginary ( ) , result [ i ] . getImaginary ( ) , tolerance ) ; } result = transformer . inversetransform ( y ) ; for ( int i = 0 ; i < ( result . length ) ; i ++ ) { assertEquals ( x [ i ] , result [ i ] . getReal ( ) , tolerance ) ; assertEquals ( 0.0 , result [ i ] . getImaginary ( ) , tolerance ) ; } double [ ] x2 = new double [ ] { 10.4 , 21.6 , 40.8 , 13.6 , 23.2 , 32.8 , 13.6 , 19.2 } ; <START_BUG> transformer . scaleArray ( x2 , ( 1.0 // ( Math . sqrt ( x2 . length ) ) ) ) ; <END_BUG> Complex [ ] y2 = y ; result = transformer . transform2 ( y2 ) ; for ( int i = 0 ; i < ( result . length ) ; i ++ ) { assertEquals ( x2 [ i ] , result [ i ] . getReal ( ) , tolerance ) ; assertEquals ( 0.0 , result [ i ] . getImaginary ( ) , tolerance ) ; } result = transformer . inversetransform2 ( x2 ) ; for ( int i = 0 ; i < ( result . length ) ; i ++ ) { assertEquals ( y2 [ i ] . getReal ( ) , result [ i ] . getReal ( ) , tolerance ) ; assertEquals ( y2 [ i ] . getImaginary ( ) , result [ i ] . getImaginary ( ) , tolerance ) ; } } public void testSinFunction ( ) throws MathException { } public void testParameters ( ) throws Exception { } }

Fix:
FastFourierTransformer . scaleArray ( x2 , ( 1.0 // ( Math . sqrt ( x2 . length ) ) ) ) ;
Buggy code:
public class UrlCompressingWebCodingStrategy extends WebRequestCodingStrategy { @ Override protected CharSequence encode ( RequestCycle requestCycle , IListenerInterfaceRequestTarget requestTarget ) { } @ Override protected CharSequence encode ( RequestCycle requestCycle , IBookmarkablePageRequestTarget requestTarget ) { if ( ( requestTarget instanceof BookmarkableListenerInterfaceRequestTarget ) && ( requestTarget . getPageParameters ( ) . containsKey ( INTERFACE_PARAMETER_NAME ) ) ) { BookmarkableListenerInterfaceRequestTarget t = ( ( BookmarkableListenerInterfaceRequestTarget ) ( requestTarget ) ) ; Page page = t . getPage ( ) ; int version = 0 ; String componentPath = t . getComponentPath ( ) ; String interfaceName = t . getInterfaceName ( ) ; <START_BUG> String pageMapName = t . getPageMapName ( ) ; <END_BUG> AppendingStringBuffer param = new AppendingStringBuffer ( ( ( 4 + ( componentPath . length ( ) ) ) + ( interfaceName . length ( ) ) ) ) ; if ( pageMapName != null ) { param . append ( pageMapName ) ; } param . append ( PATH_SEPARATOR ) ; if ( ( page instanceof WebPage ) && ( ! ( "IResourceListener" . equals ( interfaceName ) ) ) ) { param . append ( page . getId ( ) ) ; Component comp = page . get ( Strings . afterFirstPathComponent ( componentPath , PATH_SEPARATOR ) ) ; param . append ( PATH_SEPARATOR ) ; param . append ( ( ( WebPage ) ( page ) ) . getUrlCompressor ( ) . getUIDForComponentAndInterface ( comp , interfaceName ) ) ; interfaceName = null ; } else { param . append ( componentPath ) ; } param . append ( PATH_SEPARATOR ) ; if ( version != 0 ) { param . append ( version ) ; } param . append ( PATH_SEPARATOR ) ; if ( ( interfaceName != null ) && ( ! ( INTERFACE . getName ( ) . equals ( interfaceName ) ) ) ) { param . append ( interfaceName ) ; } param . append ( PATH_SEPARATOR ) ; param . append ( PATH_SEPARATOR ) ; t . getPageParameters ( ) . put ( INTERFACE_PARAMETER_NAME , param . toString ( ) ) ; } return super . encode ( requestCycle , requestTarget ) ; } }

Fix:
String pageMapName = null ;
Buggy code:
public class BindingKeyResolver extends BindingKeyParser { Compiler compiler ; Binding compilerBinding ; char [ ] [ ] compoundName ; int dimension ; LookupEnvironment environment ; ReferenceBinding genericType ; MethodBinding methodBinding ; CompilationUnitDeclaration parsedUnit ; BlockScope scope ; TypeBinding typeBinding ; TypeDeclaration typeDeclaration ; ArrayList types = new ArrayList ( ) ; int rank = 0 ; int wildcardRank ; BindingKeyResolver outerMostResolver ; private BindingKeyResolver ( BindingKeyParser parser , Compiler compiler , LookupEnvironment environment , int wildcardRank , BindingKeyResolver outerMostResolver ) { } public BindingKeyResolver ( String key ) { } public BindingKeyResolver ( String key , Compiler compiler , LookupEnvironment environment ) { } public char [ ] [ ] compoundName ( ) { } public void consumeArrayDimension ( char [ ] brakets ) { } public void consumeBaseType ( char [ ] baseTypeSig ) { <START_BUG> this . compoundName = new char [ ] [ ] { baseTypeSig } ; <END_BUG> TypeBinding baseTypeBinding = getBaseTypeBinding ( baseTypeSig ) ; if ( baseTypeBinding != null ) { this . typeBinding = baseTypeBinding ; } } public void consumeCapture ( final int position ) { } public void consumeField ( char [ ] fieldName ) { } public void consumeParameterizedGenericMethod ( ) { } public void consumeLocalType ( char [ ] uniqueKey ) { } public void consumeLocalVar ( char [ ] varName ) { } public void consumeMethod ( char [ ] selector , char [ ] signature ) { } public void consumeMemberType ( char [ ] simpleTypeName ) { } public void consumePackage ( char [ ] pkgName ) { } public void consumeParameterizedType ( char [ ] simpleTypeName , boolean isRaw ) { } public void consumeParser ( BindingKeyParser parser ) { } public void consumeScope ( int scopeNumber ) { } public void consumeRawType ( ) { } public void consumeSecondaryType ( char [ ] simpleTypeName ) { } public void consumeFullyQualifiedName ( char [ ] fullyQualifiedName ) { } public void consumeTopLevelType ( ) { } public void consumeKey ( ) { } public void consumeTypeVariable ( char [ ] typeVariableName ) { } public void consumeTypeWithCapture ( ) { } public void consumeWildCard ( int kind ) { } private TypeBinding getArrayBinding ( int dim , TypeBinding binding ) { } private TypeBinding getBaseTypeBinding ( char [ ] signature ) { } private TypeBinding getBinaryBinding ( ) { } public CompilationUnitDeclaration getCompilationUnitDeclaration ( ) { } public Binding getCompilerBinding ( ) { } private TypeBinding getTypeBinding ( char [ ] simpleTypeName ) { } private TypeBinding [ ] getTypeBindingArguments ( ) { } public void malformedKey ( ) { } public BindingKeyParser newParser ( ) { } public String toString ( ) { } }

Fix:
this . compoundName = new char [ ] [ ] { getKey ( ) . toCharArray ( ) } ;
Buggy code:
@ Singleton @ Creatable public class ViewLinker implements PropertyChangeListener { private final List < View > views = new ArrayList < View > ( ) ; private boolean propertyChanged = false ; private boolean enabled = false ; public static final String EVENT_TOPIC = "au//gov//ga//earthsci//application//globe//view//linked" ; @ Inject private static IEventBroker eventBroker ; public synchronized void link ( View view ) { } public synchronized void unlink ( View view ) { view . removePropertyChangeListener ( VIEW , this ) ; <START_BUG> views . add ( view ) ; <END_BUG> } public boolean isEnabled ( ) { } public void setEnabled ( boolean enabled ) { } @ Override public synchronized void propertyChange ( PropertyChangeEvent evt ) { } }

Fix:
views . remove ( view ) ;
Buggy code:
public class TestQueryTimeout extends SQLListenerTestCase { private boolean skipTests = false ; @ Override public void setUp ( ) { } public void testQueryTimeout1a ( ) { } public void testQueryTimeout1c ( ) { } public void testQueryTimeout21b ( ) { } public void testQueryTimeout22a ( ) { } public void testQueryTimeout23b ( ) { } public void testQueryTimeout31c ( ) { } public void testQueryTimeout32a ( ) { } public void testQueryTimeout33b ( ) { } public void testQueryTimeout33c ( ) { } public void testQueryTimeout4 ( ) { } public void testQueryTimeout5 ( ) { if ( skipTests ) { return ; } Integer setTime = new Integer ( ( - 2000 ) ) ; getLog ( ) . trace ( ( ( "testQueryTimeout5()<seq2seq4repair_space>-<seq2seq4repair_space>setHint(" + setTime ) + ")" ) ) ; EntityManager em = null ; try { em = emf . createEntityManager ( ) ; assertNotNull ( em ) ; Query q = em . createNamedQuery ( "NoHintSingle" ) ; Map < String , Object > hints = q . getHints ( ) ; assertFalse ( hints . containsKey ( "javax.persistence.query.timeout" ) ) ; getLog ( ) . trace ( ( ( "testQueryTimeout5()<seq2seq4repair_space>-<seq2seq4repair_space>Setting<seq2seq4repair_space>hint<seq2seq4repair_space>" + "javax.persistence.query.timeout=" ) + setTime ) ) ; q . setHint ( "javax.persistence.query.timeout" , setTime ) ; fail ( ( "Expected<seq2seq4repair_space>testQueryTimeout5()<seq2seq4repair_space>to<seq2seq4repair_space>throw<seq2seq4repair_space>a<seq2seq4repair_space>" + "IllegalArgumentException" ) ) ; } catch ( Exception e ) { <START_BUG> checkException ( "testQueryTimeout5()" , e , IllegalArgumentException . class , "Invalid<seq2seq4repair_space>value" ) ; <END_BUG> } finally { if ( ( em != null ) && ( em . isOpen ( ) ) ) { em . close ( ) ; } } } public void testQueryTimeout6 ( ) { } private void exec ( boolean ignoreExceptions , int timeoutSecs , String sql ) throws SQLException { } private Log getLog ( ) { } private void checkException ( String test , Exception e ) { } private void checkException ( String test , Exception tested , Class expected , String eStr ) { } private boolean matchesExpectedException ( Class < ? > expected , Exception tested , String eStr ) { } public static int delay ( int secs , int value ) throws SQLException { } public static void main ( String [ ] args ) { } }

Fix:
checkException ( "testQueryTimeout5()" , e , IllegalArgumentException . class , "invalid<seq2seq4repair_space>timeout<seq2seq4repair_space>of<seq2seq4repair_space>-2,000" ) ;
Buggy code:
public class SampleResultConverter extends AbstractCollectionConverter { private static Logger log = LoggingManager . getLoggerForClass ( ) ; public static String getVersion ( ) { } public boolean canConvert ( Class arg0 ) { } public void marshal ( Object obj , HierarchicalStreamWriter writer , MarshallingContext context ) { } protected void saveSamplerData ( HierarchicalStreamWriter writer , SampleResult res , SampleSaveConfiguration save ) { } protected void saveResponseData ( HierarchicalStreamWriter writer , SampleResult res , SampleSaveConfiguration save ) { } protected void saveRequestHeaders ( HierarchicalStreamWriter writer , SampleResult res , SampleSaveConfiguration save ) { } protected void saveResponseHeaders ( HierarchicalStreamWriter writer , SampleResult res , SampleSaveConfiguration save ) { } protected void saveSubResults ( HierarchicalStreamWriter writer , MarshallingContext context , SampleResult res , SampleSaveConfiguration save ) { } protected void saveAssertions ( HierarchicalStreamWriter writer , MarshallingContext context , SampleResult res , SampleSaveConfiguration save ) { } protected void setAttributes ( HierarchicalStreamWriter writer , SampleResult res , SampleSaveConfiguration save ) { } protected void writeString ( HierarchicalStreamWriter writer , String tag , String value ) { } public Object unmarshal ( HierarchicalStreamReader reader , UnmarshallingContext context ) { } protected boolean retrieveItem ( HierarchicalStreamReader reader , UnmarshallingContext context , SampleResult res , Object subItem ) { if ( subItem instanceof AssertionResult ) { res . addAssertionResult ( ( ( AssertionResult ) ( subItem ) ) ) ; } else if ( subItem instanceof SampleResult ) { res . addSubResult ( ( ( SampleResult ) ( subItem ) ) ) ; } else if ( reader . getNodeName ( ) . equals ( "responseHeader" ) ) { res . setResponseHeaders ( ( ( String ) ( subItem ) ) ) ; } else if ( reader . getNodeName ( ) . equals ( "requestHeader" ) ) { res . setRequestHeaders ( ( ( String ) ( subItem ) ) ) ; } else if ( reader . getNodeName ( ) . equals ( "responseData" ) ) { try { res . setResponseData ( ( ( String ) ( subItem ) ) . getBytes ( res . getDataEncoding ( ) ) ) ; } catch ( UnsupportedEncodingException e ) { <START_BUG> res . setResponseData ( new String ( ( "Can't<seq2seq4repair_space>support<seq2seq4repair_space>the<seq2seq4repair_space>char<seq2seq4repair_space>set:<seq2seq4repair_space>" + ( res . getDataEncoding ( ) ) ) ) . getBytes ( ) ) ; <END_BUG> } } else if ( reader . getNodeName ( ) . equals ( "samplerData" ) ) { res . setSamplerData ( ( ( String ) ( subItem ) ) ) ; } else { return false ; } return true ; } protected void retrieveAttributes ( HierarchicalStreamReader reader , SampleResult res ) { } public SampleResultConverter ( ClassMapper arg0 , String arg1 ) { } }

Fix:
res . setResponseData ( ( "Can't<seq2seq4repair_space>support<seq2seq4repair_space>the<seq2seq4repair_space>char<seq2seq4repair_space>set:<seq2seq4repair_space>" + ( res . getDataEncoding ( ) ) ) . getBytes ( ) ) ;
Buggy code:
public class CounterGetter extends Operation { public CounterGetter ( Session client , int index ) { } public void run ( Cassandra . Client client ) throws IOException { } private void runSuperCounterGetter ( SlicePredicate predicate , Cassandra . Client client ) throws IOException { byte [ ] rawKey = generateKey ( ) ; ByteBuffer key = ByteBuffer . wrap ( rawKey ) ; for ( int j = 0 ; j < ( session . getSuperColumns ( ) ) ; j ++ ) { String superColumn = 'S' + ( Integer . toString ( j ) ) ; <START_BUG> ColumnParent parent = new ColumnParent ( "CounterSuper1" ) . setSuper_column ( superColumn . getBytes ( ) ) ; <END_BUG> long start = System . currentTimeMillis ( ) ; boolean success = false ; String exceptionMessage = null ; for ( int t = 0 ; t < ( session . getRetryTimes ( ) ) ; t ++ ) { if ( success ) break ; try { List < ColumnOrSuperColumn > counters ; counters = client . get_slice ( key , parent , predicate , session . getConsistencyLevel ( ) ) ; success = ( counters . size ( ) ) != 0 ; } catch ( Exception e ) { exceptionMessage = getExceptionMessage ( e ) ; success = false ; } } if ( ! success ) { error ( String . format ( "Operation<seq2seq4repair_space>[%d]<seq2seq4repair_space>retried<seq2seq4repair_space>%d<seq2seq4repair_space>times<seq2seq4repair_space>-<seq2seq4repair_space>error<seq2seq4repair_space>reading<seq2seq4repair_space>counter<seq2seq4repair_space>key<seq2seq4repair_space>%s<seq2seq4repair_space>%s%n" , index , session . getRetryTimes ( ) , new String ( rawKey ) , ( exceptionMessage == null ? "" : ( "(" + exceptionMessage ) + ")" ) ) ) ; } operations . getAndIncrement ( ) ; keys . getAndIncrement ( ) ; latency . getAndAdd ( ( ( System . currentTimeMillis ( ) ) - start ) ) ; } } private void runCounterGetter ( SlicePredicate predicate , Cassandra . Client client ) throws IOException { } }

Fix:
ColumnParent parent = new ColumnParent ( "SuperCounter1" ) . setSuper_column ( superColumn . getBytes ( ) ) ;
Buggy code:
public class OVXPortSerializer implements JsonSerializer < OVXPort > { @ Override public JsonElement serialize ( final OVXPort port , final Type portType , final JsonSerializationContext context ) { final JsonObject result = new JsonObject ( ) ; result . addProperty ( "dpid" , port . getParentSwitch ( ) . getSwitchName ( ) ) ; <START_BUG> result . addProperty ( "port" , String . valueOf ( port . getPortNumber ( ) ) ) ; <END_BUG> return result ; } }

Fix:
result . addProperty ( "port" , port . getPortNumber ( ) ) ;