nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class ThreadFactoryAdd extends AbstractThreadsSubsystemUpdate < Void > { private static final long serialVersionUID = 1935521612404501853L ; private final Map < String , String > properties = new HashMap < String , String > ( ) ; private final String name ; private String groupName ; private String threadNamePattern ; private Integer priority ; public ThreadFactoryAdd ( final String name ) { } public ThreadFactoryRemove getCompensatingUpdate ( final ThreadsSubsystemElement original ) { } protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > handler , final P param ) { final ThreadFactoryService service = new ThreadFactoryService ( ) ; service . setNamePattern ( threadNamePattern ) ; service . setPriority ( priority ) ; service . setThreadGroupName ( groupName ) ; final UpdateResultHandler . ServiceStartListener < P > listener = new UpdateResultHandler . ServiceStartListener < P > ( handler , param ) ; <START_BUG> final BatchBuilder batchBuilder = updateContext . getBatchBuilder ( ) ; <END_BUG> try { batchBuilder . addService ( ThreadsServices . threadFactoryName ( name ) , service ) . addListener ( listener ) . setInitialMode ( ACTIVE ) . install ( ) ; batchBuilder . install ( ) ; } catch ( ServiceRegistryException e ) { handler . handleFailure ( e , param ) ; } } protected void applyUpdate ( final ThreadsSubsystemElement element ) throws UpdateFailedException { } public String getGroupName ( ) { } public void setGroupName ( final String groupName ) { } public String getThreadNamePattern ( ) { } public void setThreadNamePattern ( final String threadNamePattern ) { } public Integer getPriority ( ) { } public void setPriority ( final Integer priority ) { } public Map < String , String > getProperties ( ) { } }

Fix:
final BatchBuilder batchBuilder = updateContext . getServiceTarget ( ) ;
Buggy code:
public class SingleGameCycle extends GameCycle { public SingleGameCycle ( Game game ) { } @ Override public void onGameStart ( ) { } @ Override public void onGameEnds ( ) { } private void kickPlayer ( Player player , boolean wasSpectator ) { } @ Override public void onPlayerLeave ( Player player ) { } @ Override public void onGameLoaded ( ) { } @ Override public boolean onPlayerJoins ( Player player ) { if ( ( this . getGame ( ) . isFull ( ) ) && ( ! ( player . hasPermission ( "bw.vip.joinfull" ) ) ) ) { if ( ( ( this . getGame ( ) . getState ( ) ) != ( GameState . RUNNING ) ) || ( ! ( Main . getInstance ( ) . spectationEnabled ( ) ) ) ) { player . sendMessage ( ChatWriter . pluginMessage ( ( ( ChatColor . RED ) + ( Main . _l ( "lobby.gamefull" ) ) ) ) ) ; return false ; } } else if ( ( this . getGame ( ) . isFull ( ) ) && ( player . hasPermission ( "bw.vip.joinfull" ) ) ) { if ( ( this . getGame ( ) . getState ( ) ) == ( GameState . WAITING ) ) { List < Player > players = this . getGame ( ) . getNonVipPlayers ( ) ; if ( ( players . size ( ) ) == 0 ) { player . sendMessage ( ChatWriter . pluginMessage ( ( ( ChatColor . RED ) + ( Main . _l ( "lobby.gamefullpremium" ) ) ) ) ) ; return false ; } Player kickPlayer = null ; if ( ( players . size ( ) ) == 1 ) { kickPlayer = players . get ( 0 ) ; } else { kickPlayer = players . get ( Utils . randInt ( 0 , ( ( players . size ( ) ) - 1 ) ) ) ; } kickPlayer . sendMessage ( ChatWriter . pluginMessage ( ( ( ChatColor . RED ) + ( Main . _l ( "lobby.kickedbyvip" ) ) ) ) ) ; this . getGame ( ) . playerLeave ( kickPlayer , false ) ; } else { if ( ( ( this . getGame ( ) . getState ( ) ) == ( GameState . RUNNING ) ) && ( ! ( Main . getInstance ( ) . spectationEnabled ( ) ) ) ) { <START_BUG> player . sendMessage ( ChatWriter . pluginMessage ( ( ( ChatColor . RED ) + ( Main . _l ( "lobby.gamefull" ) ) ) ) ) ; <END_BUG> return false ; } } } return true ; } @ Override public void onGameOver ( GameOverTask task ) { } }

Fix:
player . sendMessage ( ChatWriter . pluginMessage ( ( ( ChatColor . RED ) + ( Main . _l ( "errors.cantjoingame" ) ) ) ) ) ;
Buggy code:
public class XtendXpandProjectWizard extends Wizard implements IExecutableExtension , INewWizard { private XtendXpandProjectWizardPage page ; private ISelection selection ; private IConfigurationElement configElement ; public XtendXpandProjectWizard ( ) { } @ Override public void addPages ( ) { } @ Override public boolean performFinish ( ) { } void doFinish ( final String name , final boolean genExample , final IProgressMonitor monitor ) { } private String getContents ( final String resource ) { try { <START_BUG> final InputStream inputStream = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( ( "org//openarchitectureware//wizards//example//" + resource ) ) ; <END_BUG> final byte [ ] buffer = new byte [ 4096 ] ; final ByteArrayOutputStream outputStream = new ByteArrayOutputStream ( ) ; while ( true ) { int read ; read = inputStream . read ( buffer ) ; if ( read == ( - 1 ) ) { break ; } outputStream . write ( buffer , 0 , read ) ; } outputStream . close ( ) ; inputStream . close ( ) ; return outputStream . toString ( "iso-8859-1" ) ; } catch ( final IOException e ) { XtendLog . logError ( e ) ; return "" ; } } public void init ( final IWorkbench workbench , final IStructuredSelection selection ) { } public void setInitializationData ( final IConfigurationElement config , final String propertyName , final Object data ) throws CoreException { } }

Fix:
final InputStream inputStream = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( ( "org//eclipse//xtend//shared//ui//wizards//example//" + resource ) ) ;
Buggy code:
public class ToStringSorter { Object [ ] sortedObjects ; String [ ] sortedStrings ; public boolean compare ( String stringOne , String stringTwo ) { } private void quickSort ( int left , int right ) { int originalLeft = left ; int originalRight = right ; <START_BUG> int midIndex = ( left + right ) // 2 ; <END_BUG> String midToString = this . sortedStrings [ midIndex ] ; do { while ( compare ( this . sortedStrings [ left ] , midToString ) ) left ++ ; while ( compare ( midToString , this . sortedStrings [ right ] ) ) right -- ; if ( left <= right ) { Object tmp = this . sortedObjects [ left ] ; this . sortedObjects [ left ] = this . sortedObjects [ right ] ; this . sortedObjects [ right ] = tmp ; String tmpToString = this . sortedStrings [ left ] ; this . sortedStrings [ left ] = this . sortedStrings [ right ] ; this . sortedStrings [ right ] = tmpToString ; left ++ ; right -- ; } } while ( left <= right ) ; if ( originalLeft < right ) quickSort ( originalLeft , right ) ; if ( left < originalRight ) quickSort ( left , originalRight ) ; } public void sort ( Object [ ] unSortedObjects , String [ ] unsortedStrings ) { } }

Fix:
int midIndex = left + ( ( right - left ) // 2 ) ;
Buggy code:
public class SchemaGroup extends NameSet implements Cloneable { private Map _schemaMap = null ; private Map < String , Schema > _delimSchemaMap = null ; private Schema [ ] _schemas = null ; public Schema [ ] getSchemas ( ) { } public Schema getSchema ( String name ) { } public Schema addSchema ( ) { } public Schema addSchema ( String name ) { } public void addDelimSchemaName ( String name , Schema schema ) { } public boolean removeSchema ( Schema schema ) { } public Schema importSchema ( Schema schema ) { if ( schema == null ) return null ; Schema copy = addSchema ( schema . getName ( ) ) ; Sequence [ ] seqs = schema . getSequences ( ) ; for ( int i = 0 ; i < ( seqs . length ) ; i ++ ) copy . importSequence ( seqs [ i ] ) ; Table [ ] tables = schema . getTables ( ) ; Index [ ] idxs ; Unique [ ] unqs ; Table tab ; for ( int i = 0 ; i < ( tables . length ) ; i ++ ) { tab = copy . importTable ( tables [ i ] ) ; idxs = tables [ i ] . getIndexes ( ) ; for ( int j = 0 ; j < ( idxs . length ) ; j ++ ) tab . importIndex ( idxs [ j ] ) ; unqs = tables [ i ] . getUniques ( ) ; for ( int j = 0 ; j < ( unqs . length ) ; j ++ ) <START_BUG> tab . importUnique ( unqs [ j ] ) ; <END_BUG> } return copy ; } public boolean isKnownTable ( Table table ) { } public boolean isKnownTable ( String name ) { } public Table findTable ( Table table ) { } public Table findTable ( String name ) { } public Table findTable ( Schema inSchema , String name ) { } public boolean isKnownSequence ( Sequence seq ) { } public boolean isKnownSequence ( String name ) { } public Sequence findSequence ( Sequence seq ) { } public Sequence findSequence ( String name ) { } public Sequence findSequence ( Schema inSchema , String name ) { } public ForeignKey [ ] findExportedForeignKeys ( PrimaryKey pk ) { } public void removeUnusedComponents ( ) { } public Object clone ( ) { } protected SchemaGroup newInstance ( ) { } protected void copy ( SchemaGroup group ) { } protected Schema newSchema ( String name ) { } protected Sequence newSequence ( String name , Schema schema ) { } protected Table newTable ( String name , Schema schema ) { } protected Column newColumn ( String name , Table table ) { } protected PrimaryKey newPrimaryKey ( String name , Table table ) { } protected Index newIndex ( String name , Table table ) { } protected Unique newUnique ( String name , Table table ) { } protected ForeignKey newForeignKey ( String name , Table table ) { } }

Fix:
tab . importUnique ( unqs [ j ] , null ) ;
Buggy code:
public class QualifiedIdentifier extends SpelNodeImpl { private TypedValue value ; public QualifiedIdentifier ( int pos , SpelNodeImpl ... operands ) { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { if ( ( this . value ) == null ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < ( getChildCount ( ) ) ; i ++ ) { Object value = children [ i ] . getValueInternal ( state ) . getValue ( ) ; if ( ( i > 0 ) && ( ! ( value . toString ( ) . startsWith ( "$" ) ) ) ) { sb . append ( "." ) ; } sb . append ( value ) ; } <START_BUG> this . value = new TypedValue ( sb . toString ( ) , STRING_TYPE_DESCRIPTOR ) ; <END_BUG> } return this . value ; } @ Override public String toStringAST ( ) { } }

Fix:
this . value = new TypedValue ( sb . toString ( ) ) ;
Buggy code:
public class FileTrainingActivity extends AppCompatActivity { Context self = this ; @ Bind ( id . file_training_toolbar ) public Toolbar toolbar ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ OnClick ( id . local1000 ) public void goToLocal1000 ( ) { } private void startDownloadWebPage ( ) { UpdateStamp albumStamp = UpdateStamp . getUpdateStampByTableName ( "T_ALBUM_INFO" ) ; String stringUrl = "http:////%serverIP:%serverPort//local1000//picIndexAjax?time_stamp=%timeStamp" . replace ( "%serverIP" , serverIP ) . replace ( "%serverPort" , serverPort ) . replace ( "%timeStamp" , albumStamp . getUpdateStamp ( ) ) ; Log . d ( "startDownloadWebPage" , stringUrl ) ; albumStamp . setUpdateStamp ( TimeUtil . getGmtInFormatyyyyMMddHHmmss ( ) ) ; albumStamp . save ( ) ; new com . example . jianming . Tasks . DownloadWebpageTask ( ) { @ Override protected void onPostExecute ( String s ) { try { com . activeandroid . ActiveAndroid . beginTransaction ( ) ; org . json . JSONArray jsonArray = new org . json . JSONArray ( s ) ; for ( int i = 0 ; i < ( jsonArray . length ( ) ) ; i ++ ) { org . json . JSONObject jsonObject = jsonArray . getJSONObject ( i ) ; com . example . jianming . beans . PicAlbumBean picIndexBean = new com . example . jianming . beans . PicAlbumBean ( ) ; <START_BUG> picIndexBean . setServerIndex ( Integer . parseInt ( jsonObject . getString ( "serverIndex" ) ) ) ; <END_BUG> picIndexBean . setName ( jsonObject . getString ( "name" ) ) ; picIndexBean . save ( ) ; } com . activeandroid . ActiveAndroid . setTransactionSuccessful ( ) ; } catch ( org . json . JSONException e ) { e . printStackTrace ( ) ; } finally { com . activeandroid . ActiveAndroid . endTransaction ( ) ; } android . content . Intent intent = new android . content . Intent ( self , PicAlbumListActivity . class ) ; self . startActivity ( intent ) ; } } . execute ( stringUrl ) ; } }

Fix:
picIndexBean . setServerIndex ( Integer . parseInt ( jsonObject . getString ( "index" ) ) ) ;
Buggy code:
public class Well512aTest extends RandomGeneratorAbstractTest { @ Override public RandomGenerator makeGenerator ( ) { <START_BUG> return new Well512a ( 100 ) ; <END_BUG> } @ Test public void testReferenceCode ( ) { } }

Fix:
return new Well512a ( 101 ) ;
Buggy code:
public class CrosscuttingMembers { private ResolvedType inAspect ; private World world ; private PerClause perClause ; private List shadowMungers = new ArrayList ( 4 ) ; private List typeMungers = new ArrayList ( 4 ) ; private List lateTypeMungers = new ArrayList ( 0 ) ; private List declareParents = new ArrayList ( 4 ) ; private List declareSofts = new ArrayList ( 0 ) ; private List declareDominates = new ArrayList ( 4 ) ; private List declareAnnotationsOnType = new ArrayList ( ) ; private List declareAnnotationsOnField = new ArrayList ( ) ; private List declareAnnotationsOnMethods = new ArrayList ( ) ; public CrosscuttingMembers ( ResolvedType inAspect ) { } public void addConcreteShadowMunger ( ShadowMunger m ) { } public void addShadowMungers ( Collection c ) { } private void addShadowMunger ( ShadowMunger m ) { } public void addTypeMungers ( Collection c ) { } public void addTypeMunger ( ConcreteTypeMunger m ) { } public void addLateTypeMungers ( Collection c ) { } public void addLateTypeMunger ( ConcreteTypeMunger m ) { } public void addDeclares ( Collection c ) { } public void addDeclare ( Declare declare ) { } public void exposeTypes ( Collection typesToExpose ) { } public void exposeType ( UnresolvedType typeToExpose ) { <START_BUG> if ( typeToExpose == ( ResolvedType . MISSING ) ) <END_BUG> return ; if ( ( typeToExpose . isParameterizedType ( ) ) || ( typeToExpose . isRawType ( ) ) ) { if ( typeToExpose instanceof ResolvedType ) { typeToExpose = ( ( ResolvedType ) ( typeToExpose ) ) . getGenericType ( ) ; } else { typeToExpose = UnresolvedType . forSignature ( typeToExpose . getErasureSignature ( ) ) ; } } ResolvedMember member = new ResolvedMemberImpl ( Member . STATIC_INITIALIZATION , typeToExpose , 0 , ResolvedType . VOID , "" , UnresolvedType . NONE ) ; addTypeMunger ( world . concreteTypeMunger ( new PrivilegedAccessMunger ( member ) , inAspect ) ) ; } public void addPrivilegedAccesses ( Collection accessedMembers ) { } private void addPrivilegedAccess ( ResolvedMember member ) { } public Collection getCflowEntries ( ) { } public boolean replaceWith ( CrosscuttingMembers other ) { } public PerClause getPerClause ( ) { } public void setPerClause ( PerClause perClause ) { } public List getDeclareDominates ( ) { } public List getDeclareParents ( ) { } public List getDeclareSofts ( ) { } public List getShadowMungers ( ) { } public List getTypeMungers ( ) { } public List getLateTypeMungers ( ) { } public List getDeclareAnnotationOnTypes ( ) { } public List getDeclareAnnotationOnFields ( ) { } public List getDeclareAnnotationOnMethods ( ) { } }

Fix:
if ( ResolvedType . isMissing ( typeToExpose ) )
Buggy code:
public class DzjBookActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onBackPressed ( ) { } private void initTextView ( ) { <START_BUG> TextView tv = ( ( TextView ) ( findViewById ( tv_player_content ) ) ) ; <END_BUG> String content = new com . odong . buddhismhomework . models . CacheFile ( this , book . getName ( ) ) . read ( ) ; if ( content == null ) { tv . setText ( lbl_empty ) ; } else { tv . setText ( content ) ; } Point p = new DwDbHelper ( this ) . get ( ( "scroll:////dzj//" + ( book . getName ( ) ) ) , Point . class ) ; if ( p == null ) { p = new Point ( ) ; } tv . scrollTo ( p . getX ( ) , p . getY ( ) ) ; } private Dzj book ; }

Fix:
TextView tv = ( ( TextView ) ( findViewById ( tv_dzj_content ) ) ) ;
Buggy code:
public class StorageManager { private FileManager fileManager ; private de . buschgaming . aptget . storagesystem . mysql . MySQL MySQL ; private Connection c = null ; private boolean usesql = false ; private final JavaPlugin plugin ; public StorageManager ( JavaPlugin plugin ) throws AptErrorExceptions { } public apt get ( ) { if ( ! ( usesql ) ) { return new YAMLapt ( plugin , fileManager ) ; } else { <START_BUG> return new SQLapt ( plugin , MySQL , c ) ; <END_BUG> } } }

Fix:
return new SQLapt ( plugin , MySQL , c , fileManager ) ;
Buggy code:
public class StringLiteral extends Literal { char [ ] source ; public StringLiteral ( char [ ] token , int s , int e ) { } public StringLiteral ( int s , int e ) { } public void computeConstant ( ) { } public ExtendedStringLiteral extendWith ( CharLiteral lit ) { } public ExtendedStringLiteral extendWith ( StringLiteral lit ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; if ( valueRequired ) codeStream . ldc ( constant . stringValue ( ) ) ; <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public TypeBinding literalType ( BlockScope scope ) { } public char [ ] source ( ) { } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public abstract class ListView extends WebMarkupContainer { private static Log log = LogFactory . getLog ( ListView . class ) ; private int viewSize = Integer . MAX_VALUE ; private int firstIndex = 0 ; public ListView ( String name , IModel model ) { } public ListView ( String name , List list ) { } public ListView ( String name , Serializable object , String expression ) { } public final List getList ( ) { } public final int getStartIndex ( ) { } public int getViewSize ( ) { int size = this . viewSize ; Object modelObject = getModelObject ( ) ; if ( ( modelObject == null ) && ( ( viewSize ) == ( Integer . MAX_VALUE ) ) ) { size = 0 ; } else if ( modelObject instanceof List ) { final int modelSize = ( ( List ) ( modelObject ) ) . size ( ) ; if ( ( firstIndex ) > modelSize ) { return 0 ; } if ( ( size == ( Integer . MAX_VALUE ) ) || ( ( ( firstIndex ) + size ) > modelSize ) ) { size = modelSize - ( firstIndex ) ; } } else if ( ( viewSize ) == ( Integer . MAX_VALUE ) ) { ListView . log . warn ( ( ( "model<seq2seq4repair_space>object<seq2seq4repair_space>(" + modelObject ) + ")<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>List<seq2seq4repair_space>and<seq2seq4repair_space>the<seq2seq4repair_space>view<seq2seq4repair_space>size<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>explicitly<seq2seq4repair_space>set" ) ) ; } <START_BUG> if ( ( ( Integer . MAX_VALUE ) - size ) <= ( firstIndex ) ) { <END_BUG> throw new IllegalStateException ( "firstIndex<seq2seq4repair_space>+<seq2seq4repair_space>size<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>smaller<seq2seq4repair_space>than<seq2seq4repair_space>Integer.MAX_VALUE" ) ; } return size ; } public void modelChangedStructure ( ) { } public ListView setStartIndex ( final int startIndex ) { } public ListView setViewSize ( final int size ) { } protected Serializable getListObject ( final int index ) { } protected void onRender ( ) { } protected ListItem newItem ( final int index ) { } protected abstract void populateItem ( final ListItem listItem ) { } protected void renderItem ( final ListItem listItem , final boolean lastItem ) { } }

Fix:
if ( ( ( Integer . MAX_VALUE ) - size ) < ( firstIndex ) ) {
Buggy code:
public class TermsFilter extends Filter { private final Set < Term > terms = new TreeSet < Term > ( ) ; public void addTerm ( Term term ) { } @ Override public DocIdSet getDocIdSet ( AtomicReaderContext context , Bits acceptDocs ) throws IOException { IndexReader reader = context . reader ; FixedBitSet result = new FixedBitSet ( reader . maxDoc ( ) ) ; Fields fields = reader . fields ( ) ; if ( fields == null ) { return result ; } BytesRef br = new BytesRef ( ) ; String lastField = null ; Terms termsC = null ; TermsEnum termsEnum = null ; DocsEnum docs = null ; for ( Term term : terms ) { if ( ! ( term . field ( ) . equals ( lastField ) ) ) { termsC = fields . terms ( term . field ( ) ) ; if ( termsC == null ) { return result ; } termsEnum = termsC . iterator ( null ) ; lastField = term . field ( ) ; } if ( ( terms ) != null ) { <START_BUG> br . copy ( term . bytes ( ) ) ; <END_BUG> if ( ( termsEnum . seekCeil ( br ) ) == ( SeekStatus . FOUND ) ) { docs = termsEnum . docs ( acceptDocs , docs ) ; while ( ( docs . nextDoc ( ) ) != ( DocsEnum . NO_MORE_DOCS ) ) { result . set ( docs . docID ( ) ) ; } } } } return result ; } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } }

Fix:
br . copyBytes ( term . bytes ( ) ) ;
Buggy code:
public class TestActionResourceBundle extends TestCase { public TestActionResourceBundle ( String name ) { } public void testMain ( ) { <START_BUG> CheckResourceBundle . checkResourceBundle ( this , new ActionResourceBundle ( ) ) ; <END_BUG> } }

Fix:
CheckResourceBundle . checkResourceBundle ( this , "org.argouml.i18n.ActionResourceBundle" ) ;
Buggy code:
final class BundleLocationResolver implements SharedConstants { private final File systemDir ; private final ConfigProperties config ; public BundleLocationResolver ( final File systemDir , final ConfigProperties config ) { } private boolean isDevMode ( ) { } private String getGroupId ( ) { } private File getProjectDir ( ) { } public String resolve ( final String gav ) { if ( isDevMode ( ) ) { final File file = findInProjectDir ( gav ) ; <START_BUG> if ( ( file != null ) && ( file . isFile ( ) ) ) { <END_BUG> return file . toURI ( ) . toString ( ) ; } } return getFileInSystem ( gav ) . toURI ( ) . toString ( ) ; } private String getFileName ( final String [ ] gav ) { } private File getFileInSystem ( final String gav ) { } private File findInProjectDir ( final String gav ) { } }

Fix:
if ( file != null ) {
Buggy code:
public class EmfXpandTest extends XpandCoreTestBase { private final String ECORE_MMODEL = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?>" + ( ( ( ( ( ( ( ( "<ecore:EPackage<seq2seq4repair_space>xmi:version=\"2.0\"<seq2seq4repair_space>" + "<seq2seq4repair_space>xmlns:xmi=\"http:////www.omg.org//XMI\"<seq2seq4repair_space>" ) + "<seq2seq4repair_space>xmlns:xsi=\"http:////www.w3.org//2001//XMLSchema-instance\"<seq2seq4repair_space>" ) + "<seq2seq4repair_space>xmlns:ecore=\"http:////www.eclipse.org//emf//2002//Ecore\"<seq2seq4repair_space>name=\"mm\"<seq2seq4repair_space>" ) + "<seq2seq4repair_space>nsURI=\"http:////www.eclipse.org//mm//test//mm\"<seq2seq4repair_space>nsPrefix=\"mm\">" ) + "<eClassifiers<seq2seq4repair_space>xsi:type=\"ecore:EClass\"<seq2seq4repair_space>name=\"MetaType\">" ) + "<eStructuralFeatures<seq2seq4repair_space>xsi:type=\"ecore:EAttribute\"<seq2seq4repair_space>name=\"name\"<seq2seq4repair_space>eType=\"ecore:EDataType<seq2seq4repair_space>http:////www.eclipse.org//emf//2002//Ecore#////EString\"//>" ) + "<//eClassifiers>" ) + "<//ecore:EPackage>" ) ; public final void testECoreMetaModelOnSourceFolders ( ) throws Exception { } public final void testUseAfterDeleteECoreMetaModel ( ) throws Exception { } public final void testUseAfterModifyECoreMetaModel ( ) throws Exception { } public final void testECoreMetaModelInDifferentProject ( ) throws Exception { env . openEmptyWorkspace ( ) ; final IPath pPath = env . addProject ( ( "test-" + ( System . currentTimeMillis ( ) ) ) ) ; <START_BUG> final IPath pPath2 = env . addProject ( ( "test-" + ( System . currentTimeMillis ( ) ) ) ) ; <END_BUG> env . addExternalJars ( pPath , env . getJavaClassLibs ( ) ) ; env . addExternalJars ( pPath2 , env . getJavaClassLibs ( ) ) ; final IPath templatesFolder = env . addPackage ( pPath , "templates" ) ; final IPath mmFolder = env . addPackage ( pPath2 , "models" ) ; env . addFile ( mmFolder , "mm.ecore" , ECORE_MMODEL ) ; IPath tpl = env . addFile ( templatesFolder , "Template.xpt" , ( ( ( ( ( tag ( "IMPORT<seq2seq4repair_space>mm" ) ) + "\n" ) + ( tag ( "DEFINE<seq2seq4repair_space>Root<seq2seq4repair_space>FOR<seq2seq4repair_space>MetaType" ) ) ) + "\n" ) + ( tag ( "ENDDEFINE" ) ) ) ) ; env . addRequiredProject ( pPath , pPath2 ) ; env . fullBuild ( ) ; assertEquals ( "No<seq2seq4repair_space>errors<seq2seq4repair_space>expected<seq2seq4repair_space>for<seq2seq4repair_space>referenced<seq2seq4repair_space>ECore<seq2seq4repair_space>MM" , 0 , env . getMarkersFor ( tpl ) . length ) ; env . removeRequiredProject ( pPath , pPath2 ) ; env . fullBuild ( ) ; assertTrue ( "Errors<seq2seq4repair_space>expected<seq2seq4repair_space>for<seq2seq4repair_space>non<seq2seq4repair_space>referenced<seq2seq4repair_space>ECore<seq2seq4repair_space>MM" , ( ( env . getMarkersFor ( tpl ) . length ) > 0 ) ) ; } }

Fix:
final IPath pPath2 = env . addProject ( ( "test2-" + ( System . currentTimeMillis ( ) ) ) ) ;
Buggy code:
public abstract class Scrollable extends Control { ScrollBar horizontalBar ; ScrollBar verticalBar ; Scrollable ( ) { } public Scrollable ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } ScrollBar createScrollBar ( int type ) { } void createWidget ( ) { } public Rectangle getClientArea ( ) { } public ScrollBar getHorizontalBar ( ) { } public ScrollBar getVerticalBar ( ) { } void releaseWidget ( ) { } int widgetExtStyle ( ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_HSCROLL ( int wParam , int lParam ) { } LRESULT WM_MOUSEWHEEL ( int wParam , int lParam ) { LRESULT result = super . WM_MOUSEWHEEL ( wParam , lParam ) ; if ( result != null ) return result ; if ( ( ( state ) & ( CANVAS ) ) != 0 ) { if ( ( wParam & ( ( OS . MK_SHIFT ) | ( OS . MK_CONTROL ) ) ) != 0 ) return result ; boolean vertical = ( ( verticalBar ) != null ) && ( verticalBar . getEnabled ( ) ) ; boolean horizontal = ( ( horizontalBar ) != null ) && ( horizontalBar . getEnabled ( ) ) ; int msg = ( vertical ) ? OS . WM_VSCROLL : horizontal ? OS . WM_HSCROLL : 0 ; if ( msg == 0 ) return result ; int [ ] value = new int [ 1 ] ; OS . SystemParametersInfo ( SPI_GETWHEELSCROLLLINES , 0 , value , 0 ) ; int delta = ( ( short ) ( wParam > > 16 ) ) ; int code = 0 ; int count = 0 ; if ( ( value [ 0 ] ) == ( OS . WHEEL_PAGESCROLL ) ) { code = ( delta < 0 ) ? OS . SB_PAGEDOWN : OS . SB_PAGEUP ; <START_BUG> count = 1 ; <END_BUG> } else { code = ( delta < 0 ) ? OS . SB_LINEDOWN : OS . SB_LINEUP ; delta = Math . abs ( delta ) ; if ( delta < ( OS . WHEEL_DELTA ) ) return result ; if ( msg == ( OS . WM_VSCROLL ) ) { count = ( ( value [ 0 ] ) * delta ) // ( OS . WHEEL_DELTA ) ; } else { count = delta // ( OS . WHEEL_DELTA ) ; } } for ( int i = 0 ; i < count ; i ++ ) { OS . SendMessage ( handle , msg , code , 0 ) ; } return LRESULT . ZERO ; } int vPosition = ( ( verticalBar ) == null ) ? 0 : verticalBar . getSelection ( ) ; int hPosition = ( ( horizontalBar ) == null ) ? 0 : horizontalBar . getSelection ( ) ; int code = callWindowProc ( handle , WM_MOUSEWHEEL , wParam , lParam ) ; if ( ( verticalBar ) != null ) { int position = verticalBar . getSelection ( ) ; if ( position != vPosition ) { Event event = new Event ( ) ; event . detail = ( position < vPosition ) ? SWT . PAGE_UP : SWT . PAGE_DOWN ; verticalBar . sendEvent ( Selection , event ) ; } } if ( ( horizontalBar ) != null ) { int position = horizontalBar . getSelection ( ) ; if ( position != hPosition ) { Event event = new Event ( ) ; event . detail = ( position < hPosition ) ? SWT . PAGE_UP : SWT . PAGE_DOWN ; horizontalBar . sendEvent ( Selection , event ) ; } } return new LRESULT ( code ) ; } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT WM_VSCROLL ( int wParam , int lParam ) { } LRESULT wmScroll ( ScrollBar bar , int msg , int wParam , int lParam ) { } }

Fix:
count = Math . abs ( ( delta // ( OS . WHEEL_DELTA ) ) ) ;
Buggy code:
public class Utils { public static String join ( String [ ] data , String d ) { } private static String cleanNumberString ( String data ) { } private static boolean isParseable ( String data ) { } public static double getDouble ( String data ) { } public static int getInt ( String data ) { } public static long getLong ( String data ) { } public static double getPercent ( double numerator , double denominator ) { } private static String getDividendDateFormat ( String date ) { } public static Calendar parseDividendDate ( String date ) { if ( ! ( Utils . isParseable ( date ) ) ) { return null ; } SimpleDateFormat format = new SimpleDateFormat ( Utils . getDividendDateFormat ( date ) ) ; format . setTimeZone ( TimeZone . getTimeZone ( TIMEZONE ) ) ; try { Calendar today = Calendar . getInstance ( TimeZone . getTimeZone ( TIMEZONE ) ) ; Calendar parsedDate = Calendar . getInstance ( TimeZone . getTimeZone ( TIMEZONE ) ) ; <START_BUG> parsedDate . setTime ( format . parse ( date ) ) ; <END_BUG> if ( ( parsedDate . get ( Calendar . YEAR ) ) == 1970 ) { parsedDate . set ( Calendar . YEAR , today . get ( Calendar . YEAR ) ) ; } return parsedDate ; } catch ( ParseException ex ) { logger . log ( Level . SEVERE , ex . getMessage ( ) , ex ) ; return null ; } } public static Calendar parseDateTime ( String date , String time ) { } public static Calendar parseHistDate ( String date ) { } public static String getURLParameters ( Map < String , String > params ) { } public static String stripOverhead ( String line ) { } public static String unescape ( String data ) { } }

Fix:
parsedDate . setTime ( format . parse ( date . trim ( ) ) ) ;
Buggy code:
public class StandaloneServer extends AbstractServer { private static final String STANDALONE_XML = "standalone.xml" ; private final StandardElementReaderRegistrar extensionRegistrar ; protected StandaloneServer ( ServerEnvironment environment ) { } public void start ( ) throws ServerStartException { <START_BUG> final File standalone = new File ( getEnvironment ( ) . getDomainConfigurationDir ( ) , StandaloneServer . STANDALONE_XML ) ; <END_BUG> if ( ! ( standalone . isFile ( ) ) ) { throw new ServerStartException ( ( ( "File<seq2seq4repair_space>" + ( standalone . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ) ) ; } if ( ! ( standalone . canWrite ( ) ) ) { throw new ServerStartException ( ( ( "File<seq2seq4repair_space>" + ( standalone . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>writeable." ) ) ; } final ParseResult < ServerModel > parseResult = new ParseResult < ServerModel > ( ) ; try { final XMLMapper mapper = Factory . create ( ) ; extensionRegistrar . registerStandardStandaloneReaders ( mapper ) ; mapper . parseDocument ( parseResult , XMLInputFactory . newInstance ( ) . createXMLStreamReader ( new BufferedReader ( new FileReader ( standalone ) ) ) ) ; } catch ( Exception e ) { throw new ServerStartException ( "Caught<seq2seq4repair_space>exception<seq2seq4repair_space>during<seq2seq4repair_space>processing<seq2seq4repair_space>of<seq2seq4repair_space>standalone.xml" , e ) ; } start ( parseResult . getResult ( ) ) ; new Thread ( ) { public void run ( ) { for ( ; ; ) try { Thread . sleep ( 1000000L ) ; } catch ( InterruptedException ignore ) { } } } . start ( ) ; } Callback createListenerCallback ( ) { } }

Fix:
final File standalone = new File ( getEnvironment ( ) . getServerConfigurationDir ( ) , StandaloneServer . STANDALONE_XML ) ;
Buggy code:
public class CitizensProvider implements INpcProvider { private static CitizensProvider _instance ; public static CitizensProvider getInstance ( ) { } public static Collection < Npc > getSpawned ( ) { } private final Map < Entity , Npc > _spawned = new WeakHashMap < > ( 15 ) ; private final Map < NPC , Npc > _npcs = new WeakHashMap < > ( 15 ) ; private final NpcTraitRegistry _traits = new NpcTraitRegistry ( null ) ; @ Override public String getName ( ) { } @ Override public String getVersion ( ) { } @ Override public int getLogicalVersion ( ) { } @ Override public void onRegister ( ) { } @ Override public void onEnable ( ) { Bukkit . getPluginManager ( ) . registerEvents ( new CitizensNavigatorListener ( ) , Nucleus . getPlugin ( ) ) ; <START_BUG> Bukkit . getPluginManager ( ) . registerEvents ( new CitizensNpcListener ( ) , Nucleus . getPlugin ( ) ) ; <END_BUG> Scheduler . runTaskRepeat ( Nucleus . getPlugin ( ) , 1 , 1 , new AiRunner ( ) ) ; try { TraitReplacer . replaceTraits ( ) ; } catch ( NoSuchFieldException | IllegalAccessException | NoSuchMethodException e ) { e . printStackTrace ( ) ; } } @ Override public void onDisable ( ) { } @ Override public INpcRegistry createRegistry ( Plugin plugin , String name ) { } @ Override public boolean isNpc ( Entity entity ) { } @ Override public Npc getNpc ( Entity entity ) { } @ Override public INpcTraitTypeRegistry registerTrait ( NpcTraitType traitType ) { } @ Override public boolean isTraitRegistered ( String name ) { } @ Override public NpcTraitType getTraitType ( String name ) { } public NpcTraitRegistry getTraitRegistry ( ) { } public void registerEntity ( Npc npc , Entity entity ) { } public void unregisterEntity ( Entity entity ) { } public void registerNPC ( Npc npc ) { } public void unregisterNPC ( Npc npc ) { } @ Nullable public Npc getNpc ( NPC npc ) { } }

Fix:
Bukkit . getPluginManager ( ) . registerEvents ( new BukkitListener ( ) , Nucleus . getPlugin ( ) ) ;
Buggy code:
public class CaseSensitiveToCaseInsensitiveFilter implements Function < String , String > { @ Override public String apply ( final String input ) { String res = "" ; for ( int i = 0 ; i < ( input . length ( ) ) ; i ++ ) { final char testChar = input . charAt ( i ) ; <START_BUG> if ( Character . isLowerCase ( testChar ) ) { <END_BUG> res += testChar ; } else { res += "^" + testChar ; } } return res ; } }

Fix:
if ( ( Character . isLowerCase ( testChar ) ) || ( testChar == '_' ) ) {
Buggy code:
public class MapperTimeSlice extends Mapper < LongWritable , Text , Text , Text > { private static org . slf4j . Logger Logger = LoggerFactory . getLogger ( MapperTimeSlice . class ) ; private int count = 0 ; private Map < String , String > keys ; private int keyCol ; private int tsCol ; private int valCol ; private int tsVal ; @ Override public void setup ( Context context ) throws IOException , IllegalArgumentException { } protected void map ( LongWritable key , Text value , Context context ) throws IOException , InterruptedException { if ( ( count ) > ( MapReduceTemporalLauncher . SKIP_LINES ) ) { String [ ] split = Iterables . toArray ( Splitter . on ( "\t" ) . trimResults ( ) . omitEmptyStrings ( ) . split ( value . toString ( ) ) , String . class ) ; try { if ( MapReduceTemporalLauncher . verifyLine ( split , keyCol , tsCol , valCol ) ) { <START_BUG> if ( ( tsVal ) == ( Float . parseFloat ( split [ tsCol ] ) ) ) { <END_BUG> if ( ! ( keys . containsKey ( split [ keyCol ] ) ) ) { keys . put ( split [ keyCol ] , ( ( ( split [ tsCol ] ) + ( MapReduceTemporalLauncher . TS_DELIM ) ) + ( value . toString ( ) ) ) ) ; } else { String prevTs = Splitter . on ( MapReduceTemporalLauncher . TS_DELIM ) . omitEmptyStrings ( ) . split ( keys . get ( split [ keyCol ] ) ) . iterator ( ) . next ( ) ; if ( ( Float . parseFloat ( prevTs ) ) < ( Float . parseFloat ( split [ tsCol ] ) ) ) { keys . put ( split [ keyCol ] , ( ( ( split [ tsCol ] ) + ( MapReduceTemporalLauncher . TS_DELIM ) ) + ( value . toString ( ) ) ) ) ; } } } } } catch ( Exception e ) { for ( String p : split ) MapperTimeSlice . Logger . error ( ( p + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) ) ; e . printStackTrace ( ) ; } } ( count ) ++ ; } @ Override public void cleanup ( Context context ) throws IOException , InterruptedException { } }

Fix:
if ( ( tsVal ) >= ( Float . parseFloat ( split [ tsCol ] ) ) ) {
Buggy code:
public final class ObjectConverterInfoKey < RESULT > { private final Class < ? > [ ] sources ; private final Class < RESULT > target ; public ObjectConverterInfoKey ( final Class < ? > [ ] sources , final Class < RESULT > target ) { } public Class < ? > [ ] getSources ( ) { } public Class < RESULT > getTarget ( ) { } @ Override public int hashCode ( ) { } @ SuppressWarnings ( "unchecked" ) @ Override public boolean equals ( final Object obj ) { if ( ! ( obj instanceof ObjectConverterInfoKey ) ) { return false ; } final ObjectConverterInfoKey < RESULT > other = ( ( ObjectConverterInfoKey < RESULT > ) ( obj ) ) ; <START_BUG> if ( ( getTarget ( ) ) == ( other . getTarget ( ) ) ) { <END_BUG> return false ; } final Class < ? > [ ] selfSources = getSources ( ) ; final Class < ? > [ ] otherSources = other . getSources ( ) ; final int selfLength = HoudiniUtils . size ( selfSources ) ; final int otherLength = HoudiniUtils . size ( otherSources ) ; if ( selfLength != otherLength ) { return false ; } else if ( selfLength == 0 ) { return true ; } for ( int i = 0 ; i < selfLength ; i ++ ) { final Class < ? > selfClass = selfSources [ i ] ; final Class < ? > otherClass = otherSources [ i ] ; if ( ( ( selfClass != ( Object . class ) ) && ( otherClass != ( Object . class ) ) ) && ( selfClass != otherClass ) ) { return false ; } } return true ; } @ Override public String toString ( ) { } }

Fix:
if ( ( getTarget ( ) ) != ( other . getTarget ( ) ) ) {
Buggy code:
public class MvcNamespaceTests { private GenericWebApplicationContext appContext ; private MvcNamespaceTests . TestController handler ; private HandlerMethod handlerMethod ; @ Before public void setUp ( ) throws Exception { } @ Test public void testDefaultConfig ( ) throws Exception { } @ Test ( expected = TypeMismatchException . class ) public void testCustomConversionService ( ) throws Exception { } @ Test public void testCustomValidator ( ) throws Exception { } @ Test public void testInterceptors ( ) throws Exception { } @ Test public void testResources ( ) throws Exception { } @ Test public void testResourcesWithOptionalAttributes ( ) throws Exception { } @ Test public void testDefaultServletHandler ( ) throws Exception { } @ Test public void testDefaultServletHandlerWithOptionalAttributes ( ) throws Exception { } @ Test public void testBeanDecoration ( ) throws Exception { } @ Test public void testViewControllers ( ) throws Exception { } @ Test public void testViewControllersOnWebSphere ( ) throws Exception { } @ Test public void testViewControllersDefaultConfig ( ) { } @ Test public void testCustomContentNegotiationManager ( ) throws Exception { <START_BUG> loadBeanDefinitions ( "mvc-config-content-negotiation-manager.xml" , 14 ) ; <END_BUG> RequestMappingHandlerMapping mapping = appContext . getBean ( RequestMappingHandlerMapping . class ) ; ContentNegotiationManager manager = mapping . getContentNegotiationManager ( ) ; MockHttpServletRequest request = new MockHttpServletRequest ( "GET" , "//foo.xml" ) ; NativeWebRequest webRequest = new org . springframework . web . context . request . ServletWebRequest ( request ) ; assertEquals ( Arrays . asList ( MediaType . valueOf ( "application//rss+xml" ) ) , manager . resolveMediaTypes ( webRequest ) ) ; } private void loadBeanDefinitions ( String fileName , int expectedBeanCount ) { } @ Controller public static class TestController { private boolean recordedValidationError ; @ RequestMapping public void testBind ( @ RequestParam @ DateTimeFormat ( iso = ISO . DATE ) Date date , @ Validated ( MvcNamespaceTests . MyGroup . class ) MvcNamespaceTests . TestBean bean , BindingResult result ) { } } public static class TestValidator implements Validator { boolean validatorInvoked ; public boolean supports ( Class < ? > clazz ) { } public void validate ( Object target , Errors errors ) { } } @ Retention ( RetentionPolicy . RUNTIME ) public @ interface MyGroup { } private static class TestBean { @ NotNull ( groups = MvcNamespaceTests . MyGroup . class ) private String field ; @ SuppressWarnings ( "unused" ) public String getField ( ) { } @ SuppressWarnings ( "unused" ) public void setField ( String field ) { } } private static class TestMockServletContext extends MockServletContext { @ Override public RequestDispatcher getNamedDispatcher ( String path ) { } } }

Fix:
loadBeanDefinitions ( "mvc-config-content-negotiation-manager.xml" , 12 ) ;
Buggy code:
public class GemboSyncEmployee extends Service { public final IBinder mBinder = new GemboSyncEmployee . LocalBinder ( ) ; public GemboSyncEmployee ( ) { } @ Override public void onCreate ( ) { } @ Override public void onDestroy ( ) { } @ Override public int onStartCommand ( Intent intent , int flags , int startId ) { } private void uploadPhotos ( ) { } private void updateOrdersStatus ( ) { new Thread ( new Runnable ( ) { @ Override public void run ( ) { Context context = getBaseContext ( ) ; while ( true ) { SqlDataManager sqlDataManager = new SqlDataManager ( context ) ; Cursor orders = sqlDataManager . getOrdersToUpdate ( ) ; OrderHelper orderHelper = new OrderHelper ( ) ; while ( orders . moveToNext ( ) ) { String orderID = orders . getString ( orders . getColumnIndexOrThrow ( ORDER_IDENTIFER ) ) ; orderHelper . orderStatus = orders . getInt ( orders . getColumnIndexOrThrow ( ORDER_STATUS ) ) ; orderHelper . context = context ; orderHelper . orderID = orderID ; orderHelper . description = orders . getString ( orders . getColumnIndexOrThrow ( ORDER_DESCRIPTION ) ) ; orderHelper . doInBackground ( ) ; while ( ! ( orderHelper . isFinished ( ) ) ) { try { Thread . sleep ( ( ( long ) ( 100 ) ) ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } int result = orderHelper . getResult ( ) ; <START_BUG> if ( result == 0 ) { <END_BUG> sqlDataManager . markOrderAsSent ( orderID ) ; } } orders . close ( ) ; try { Thread . sleep ( ( ( long ) ( 10000 ) ) ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } } } ) . start ( ) ; } private void updateUserInfo ( ) { } @ Override public IBinder onBind ( Intent intent ) { } public class LocalBinder extends Binder { GemboSyncEmployee getService ( ) { } } }

Fix:
if ( ( result == 0 ) || ( result == 3 ) ) {
Buggy code:
public class TestListOrderedMap extends AbstractTestOrderedMap { public TestListOrderedMap ( String testName ) { } public static Test suite ( ) { } public static void main ( String [ ] args ) { } public Map makeEmptyMap ( ) { } public void testGetByIndex ( ) { } public void testGetValueByIndex ( ) { } public void testIndexOf ( ) { } public void testSetValueByIndex ( ) { } public void testRemoveByIndex ( ) { } public void testPut_intObjectObject ( ) { } public void testPutAllWithIndex ( ) { resetEmpty ( ) ; ListOrderedMap lom = ( ( ListOrderedMap ) ( map ) ) ; lom . put ( "testInsert0" , "testInsert0v" ) ; lom . put ( "testInsert1" , "testInsert1v" ) ; lom . put ( "testInsert2" , "testInsert2v" ) ; assertEquals ( "testInsert0v" , lom . getValue ( 0 ) ) ; assertEquals ( "testInsert1v" , lom . getValue ( 1 ) ) ; assertEquals ( "testInsert2v" , lom . getValue ( 2 ) ) ; <START_BUG> Map values = new HashMap ( ) ; <END_BUG> values . put ( "NewInsert0" , "NewInsert0v" ) ; values . put ( "NewInsert1" , "NewInsert1v" ) ; lom . putAll ( 1 , values ) ; assertEquals ( "testInsert0v" , lom . getValue ( 0 ) ) ; assertEquals ( "NewInsert0v" , lom . getValue ( 1 ) ) ; assertEquals ( "NewInsert1v" , lom . getValue ( 2 ) ) ; assertEquals ( "testInsert1v" , lom . getValue ( 3 ) ) ; assertEquals ( "testInsert2v" , lom . getValue ( 4 ) ) ; } public void testValueList_getByIndex ( ) { } public void testValueList_setByIndex ( ) { } public void testValueList_removeByIndex ( ) { } public BulkTest bulkTestKeyListView ( ) { } public BulkTest bulkTestValueListView ( ) { } public class TestKeyListView extends AbstractTestList { TestKeyListView ( ) { } public List makeEmptyList ( ) { } public List makeFullList ( ) { } public Object [ ] getFullElements ( ) { } public boolean isAddSupported ( ) { } public boolean isRemoveSupported ( ) { } public boolean isSetSupported ( ) { } public boolean isNullSupported ( ) { } public boolean isTestSerialization ( ) { } } public class TestValueListView extends AbstractTestList { TestValueListView ( ) { } public List makeEmptyList ( ) { } public List makeFullList ( ) { } public Object [ ] getFullElements ( ) { } public boolean isAddSupported ( ) { } public boolean isRemoveSupported ( ) { } public boolean isSetSupported ( ) { } public boolean isNullSupported ( ) { } public boolean isTestSerialization ( ) { } } public String getCompatibilityVersion ( ) { } }

Fix:
Map values = new ListOrderedMap ( ) ;
Buggy code:
public final class OrderLocalStep < S , M > extends MapStep < S , S > implements ComparatorHolder < M > , TraversalParent { private List < Comparator < M > > comparators = new ArrayList < > ( ) ; private ChainedComparator < M > chainedComparator = null ; public OrderLocalStep ( final Traversal . Admin traversal ) { } @ Override protected S map ( final Traverser . Admin < S > traverser ) { } @ Override public void addComparator ( final Comparator < M > comparator ) { } @ Override public List < Comparator < M > > getComparators ( ) { } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } @ Override public Set < TraverserRequirement > getRequirements ( ) { <START_BUG> return Collections . singleton ( OBJECT ) ; <END_BUG> } @ Override public < S , E > List < Admin < S , E > > getLocalChildren ( ) { } @ Override public void addLocalChild ( final Traversal . Admin < ? , ? > localChildTraversal ) { } @ Override public OrderLocalStep < S , M > clone ( ) { } private static final < A > List < A > sortCollection ( final Collection < A > collection , final ChainedComparator < ? > comparator ) { } private static final < K , V > Map < K , V > sortMap ( final Map < K , V > map , final ChainedComparator < ? > comparator ) { } }

Fix:
return this . getSelfAndChildRequirements ( OBJECT ) ;
Buggy code:
public class CommandCommandHandler extends CommandHandlerWithHelp { private final ArgumentWithValue action = new ArgumentWithValue ( this , new SimpleTabCompleter ( new String [ ] { "add" , "list" , "remove" } ) , 0 , "--action" ) ; private final ArgumentWithValue nodePath ; private final ArgumentWithValue idProperty ; private final ArgumentWithValue commandName ; private final CommandRegistry cmdRegistry ; private DefaultCallbackHandler callback ; public CommandCommandHandler ( CommandRegistry cmdRegistry ) { } @ Override protected void doHandle ( CommandContext ctx ) throws CommandFormatException { final ParsedCommandLine args = ctx . getParsedCommandLine ( ) ; final String action = this . action . getValue ( args ) ; if ( action == null ) { ctx . printLine ( "Command<seq2seq4repair_space>is<seq2seq4repair_space>missing." ) ; return ; } if ( action . equals ( "list" ) ) { ctx . printColumns ( getExistingCommands ( ) ) ; return ; } if ( action . equals ( "add" ) ) { final String nodePath = this . nodePath . getValue ( args , true ) ; final String propName = this . idProperty . getValue ( args , false ) ; final String cmdName = this . commandName . getValue ( args , true ) ; if ( ! ( validateInput ( ctx , nodePath , propName ) ) ) { return ; } if ( ( cmdRegistry . getCommandHandler ( cmdName ) ) != null ) { ctx . printLine ( ( ( "Command<seq2seq4repair_space>'" + cmdName ) + "'<seq2seq4repair_space>already<seq2seq4repair_space>registered." ) ) ; return ; } <START_BUG> cmdRegistry . registerHandler ( new GenericTypeOperationHandler ( nodePath , propName ) , cmdName ) ; <END_BUG> return ; } if ( action . equals ( "remove" ) ) { final String cmdName = this . commandName . getValue ( args , true ) ; CommandHandler handler = cmdRegistry . getCommandHandler ( cmdName ) ; if ( ! ( handler instanceof GenericTypeOperationHandler ) ) { ctx . printLine ( ( ( "Command<seq2seq4repair_space>'" + cmdName ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>generic<seq2seq4repair_space>type<seq2seq4repair_space>command." ) ) ; return ; } cmdRegistry . remove ( cmdName ) ; return ; } ctx . printLine ( ( "Unexpected<seq2seq4repair_space>action:<seq2seq4repair_space>" + action ) ) ; } protected List < String > getExistingCommands ( ) { } protected List < Property > getNodeProperties ( CommandContext ctx ) { } protected ModelNode initRequest ( CommandContext ctx ) { } protected boolean validateInput ( CommandContext ctx , String typePath , String propertyName ) { } }

Fix:
cmdRegistry . registerHandler ( new GenericTypeOperationHandler ( ctx , nodePath , propName ) , cmdName ) ;